String Interview Question for Fresher and Experienced


1) How many ways to create a String object &StringBuffer object?
2) What is the difference between? a. String str=”pritam”; b. String str = new String(“pritam”);
3) equals() method present in which class?
4) What is purpose of String class equals() method.
5) What is the difference between equals() and == operator?
6) What is the difference between by immutability & immutability?
7) Can you please tell me some of the immutable classes and mutable classes?
8) String &StringBuffer&StringBuilder&StringTokenizer presented package names?
9) What is the purpose of String class equals() &StringBuffer class equals()?
10) What is the purpose of StringTokenizernd this class functionality replaced method name?
11) How to reverse String class content?
12) What is the purpose of trim?
13) Is it possible to create StringBuffer object by passing String object as a argument?
14) What is the difference between concat() method & append()?
15) What is the purpose of concat() and toString()?
16) What is the difference between StringBuffer and StringBuilder?
17) What is the difference between String and StringBuffer?
18) What is the difference between compareTo() vseqauls()?
19) What is the purpose of contains() method?
20) What is the difference between length vs length()?
21) What is the default capacity of StringBuffer?
22) What do you mean by factory method?
23) Concat() method is a factory method or not?
24) What is the difference between heap memory and String constant pool memory?
25) String is a final class or not?
26) StringBuilder and StringTokenizer introduced in which versions?
27) What do you mean by legacy class & can you please give me one example of legacy class?
28) How to apply StringBuffer class methods on String class Object content?
29) When we use String &StringBuffer& String?
30) What do you mean by cloneaing and use of cloning?
31) Who many types of cloneaing in java?
32) What do you mean by cloneable interface present in which package and what is the purpose?
33) What do you mean by marker interface and Cloneable is a marker interface or not?
34) How to create duplicate object in java(by using which method)?

Comments

Popular posts from this blog

Exception Handling

Multithreading Interview Question for Fresher and Experienced

Collections Framework Interview Questions for Fresher and Experienced