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 … Continue reading Frequently Asked Java Programs: 34 – Java Program to Check if Two Strings are Anagram

Java Interview Question – Explain public static void main(String[] args)

This is an important interview question in Java and mainly asked to Freshers. I will try to explain my best it here. A Java program has a starting point of execution with a predefined signature of main method in a class. Method signature of main method is given below:-

This could be also written … Continue reading Java Interview Question – Explain public static void main(String[] args)

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 … Continue reading Frequently Asked Java Programs 31 – Java Program to Find Common Characters in Two Given Strings