Tag: frequently asked java programs

Frequently Asked Java Programs: 34 – Java Program to Check if Two Strings are Anagram

Hello Folks, As part of Frequently Asked Java Programs In Interviews For Freshers And Experienced, in this post we will see a java program to check if two given strings are anagram. What are Anagrams strings? Two words are called Anagrams if they have the same characters with same number of occurance. For example:- SILENT and […]

Frequently Asked Java Programs: 33 – Insert a String into Another String at given index

Hello Folks, As part of Frequently Asked Java Programs In Interviews For Freshers And Experienced, in this post we will see a java program to Insert a String into Another String at given index. Problem Statement:- String s1 = MakeEasy String s2= Selenium indexToInsertS2= 4 Insert s2 in to s1 at index 4th. So s1 should […]

Frequently Asked Java Programs: 32 – Swap Two String Variables Without Using Third Variable

Hello Folks, As part of Frequently Asked Java Programs In Interviews For Freshers And Experienced, in this post we will see a java program to swap two String variables without using third variable. Problem Statement:- Before Swapping: String s1= “Java”; String s2= “Selenium”; After Swapping: String s1= “Selenium”; String s2= “Java”; We have already seen Swapping […]

Frequently Asked Java Programs 31 – Java Program to Find Common Characters in Two Given Strings

Hello Folks, As part of Frequently Asked Java Programs In Interviews For Freshers And Experienced, in this post we will see a java program Find Common Characters in Two Given Strings. Problem Statement:- String s1= “ABCDEF” String s2= “DEFXYZ” Output: DEF Solution:- This problem can be solved with or without using collection concepts in Java. I […]

Please wait...

Subscribe to new posts to become automation expert

Want to be notified when my new post is published? Get my posts in your inbox.