| Other Core Java Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What is the difference between Stream Reader and Stream Writer? | | 4 |
| class A{
class B{
}
}
in which name u save the file,its the program compile? | HCL | 6 |
| What are types of Java applications? | | 4 |
| What is data abstraction? Elaborate with example? | BMC | 3 |
| For which statements we use a label? | Wipro | 3 |
| Difference between abstract class and Interfaces? | Sai-Softech | 5 |
| how you will prevent inheritance is there any other way
other than inheritance? | Wipro | 4 |
| Can a lock be acquired on a class? | | 2 |
| can we have function for truncating the sign as like abs in
oracle. | | 1 |
| I have a String s = java; What is the output when I say
s.replaceAll('j', 'k'); Also what is the value of s after
replacing? | KPIT | 5 |
| Name the types of mouse event listeners ? | | 2 |
| Accenture NJ mostly ask question on Collection like
1)How to sort Objcts and how treeset sort them
2)Explain mechanism of Hashcode finding in Java
3)Name some of the Sorted collection. | Accenture | 2 |
| Hi Friends, I am beginner in java. what i know about
synchonized keyword is,If more that one 1 thread tries to
access a particular resource we can lock the method using
synchronized keyword. Then after that how the lock is
released and how next thread access that.Please explain with
example. | | 1 |
| if i have one string class then how can you achive this
class functionality of this class? | Fidelity | 3 |
| real time example for deadlock,starvation,livelock | | 4 |
| public class AboutStrings{
public static void main(String args[]){
String s1="hello";
String s2="hel";
String s3="lo";
String s4=s2+s3;
//to know the hash codes of s1,s4.
System.out.println(s1.hashCode());
System.out.println(s4.hashCode());
// these two s1 and s4 are having same hashcodes.
if(s1==s4){
System.out.println("s1 and s4 are same.");
}else
System.out.println("s1 and s4 are not same.");
}
}
Somebody told me that, == operator compares references of
the objects.
In the above example even though s1 and s4 are refering to
same object(having same hash codes),
it is printing s1 and s4 are not same.
Can anybody explain in detail why it is behaving like this?
Thanks in Advance
RavuriVinod
| TCS | 3 |
| What are Access Specifiers and Access Modifiers. | TCS | 4 |
| why ,we are using jsp and html.which one is better? | Photon | 1 |
| explain the concept of inheritance with an example? | Polaris | 5 |
| What is adapter class? | | 2 |
| |
| For more Core Java Interview Questions Click Here |