| Other Core Java Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is the Use of throws exception? | | 2 |
| What is the difference between Integer and int? | | 4 |
| what are the differences between final,finally,finalize
methods? | | 7 |
| How do you relate a Interface to a Class? Tell me in
Detail? | | 4 |
| whats is the use of final,in which situation final can be
used in the application? | DNS | 2 |
| Given:
1. package test;
2.
3. class Target {
4. public String name = “hello”;
5. }
What can directly access and change the value of the
variable name?
1 any class
2 only the Target class
3 any class in the test package
4 any class that extends Target
| | 3 |
| Can applet in different page/s communicate with each other? | | 1 |
| whats the life cycle of jsp
| Satyam | 2 |
| what is jms? features of jms | CTS | 1 |
| what is meant by UP& DOWN casting in java? | | 4 |
| What are File and RandomAccessFile classes? | | 1 |
| diff between abstract methods and interfaces with programing
(code) example? | | 2 |
| what is difference between validation.xml & validation
rules.xml? | BirlaSoft | 5 |
| what is the use of finalize()Method
please explain with an example | | 2 |
| How can you debug the Java code? | BirlaSoft | 3 |
| what is the difference between HashMap And HashTable? | Hexaware | 3 |
| can we add two numbers without using arthematic operators?
if possible how? | | 2 |
| Write program to print Hello World and print each character
address in that string and print how many times each
character is in that string?
Ex: H: 0 & 1
e:1 & 1
l :2,3,8 & 3
o:4,6 & 2
w:5 & 1
r: 7 & 1
d 9 & 1 | Huawei | 3 |
| public class Garbage
{
int a=0;
public void add()
{
int c=10+20;
System.out.println(c);
System.out.println(a);
}
public static void main(String args[])
{
Garbage obj=new Garbage();
System.gc();
System.out.println("Garbage Collected");
obj.add();
}
}
Above is a code in java used for garbage collection. object
obj has been created for the class Garbage and system.gc
method is called. Then using that object add method is
called.System.gc method if called the obj should be garbage
collected? | | 6 |
| What is the difference between error and exception and
explain in simple words not whatever is given in the book. | | 6 |
| |
| For more Core Java Interview Questions Click Here |