-
-
-
Convert string object to primitive Integer Type
How can i convert a string object to a primitive Integer type???????Thanks
-
-
-
SetEx setEx1 = new SetEx("Java");
String str1 = new String("Java");
String str2 = new String("Java");
s.add(setEx);
s.add(setEx1);
s.add(str1);
s.add(str2);
System.out.println("No Of elements in the Set is " + s.size());
}
What is the result and how?">Import java.util.*;public class SetEx { private String str; SetEx(String s) { str = s } public static void main(String[] ar) { Set s = new HashSet(); SetEx setEx = new SetEx("Java"); SetEx setEx1 = new SetEx("Java"); String str1 = new String("Java"); String str2 = new String("Java"); s.add(setEx); s.add(setEx1); s.add(str1); s.add(str2); System.out.println("No Of elements in the Set is " + s.size()); }What is the result and how?
-
-
What is the difference between instance,object,refference,class.
Give the answer
-
-
-
-
-
Implement Interface using Polymorphism
How an interface can be implemented using polymorphism?Why multiple inheritence is not used in Java?
-
-
Restrict a Class
How can we restrict a class so that no instance creation of class possible without declaring the class as Abstract ?
-
-
Access Specifier
What will happen if same access specifier repeats more than once within a class?
-
Read Number Methods
How many methods to read numbers and characters and what should be used.
-
Null keyword
Is null a keyword? if not what is it?
-
Core Java Interview Questions
Ans