Java Interview Questions

 
1.
What is a transient variable?
2.
Which containers use a border layout as their default layout?
3.
How are Observer and Observable used in Java Programming?
4.
What is synchronization and why is it important in Java Programming?
5.
What are synchronized methods and synchronized statements in Java Programming?
6.
What are three ways in which a thread can enter the waiting state in Java Programming?
7.
Can a lock be acquired on a class in Java Programming?
8.
What's new with the stop(), suspend() and resume() methods in JDK 1.2?
9.
What is the preferred size of a component in Java Programming?
10.
What method is used to specify a container's layout in Java Programming?
11.
Which containers use a FlowLayout as their default layout in Java Programming?
12.
What state does a thread enter when it terminates its processing in Java Programming?
13.
What is the Collections API in Java Programming?
14.
What is the List interface in Java Programming?
15.
How does Java handle integer overflows and underflows?
16.
What is the Vector class in Java Programming?
17.
What modifiers may be used with an inner class that is a member of an outer class in Java Programming?
18.
If a method is declared as protected, where may the method be accessed in Java Programming?
19.
What is an Iterator interface in Java Programming?
20.
How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters in Java Programming?
21.
What is the difference between yielding and sleeping in Java Programming?
22.
Is sizeof a keyword in Java Programming?
23.
What are wrapped classes in Java Programming?
24.
Does garbage collection guarantee that a program will not run out of memory?
25.
What is the difference between preemptive scheduling and time slicing in Java Programming?
26.
Name Component subclasses that support painting in Java Programming?
27.
What is a native method in Java Programming?
28.
How can you write a loop indefinitely in Java Programming?
29.
Can an anonymous class be declared as implementing an interface and extending a class in Java Programming?
30.
What is the purpose of finalization in Java Programming?
31.
Which class is the superclass for every class in Java Programming?
32.
What invokes a thread's run() method in Java Programming?
33.
What is the difference between the Boolean & operator and the && operator in Java Programming?
34.
What is the GregorianCalendar class in Java Programming?
35.
What is the SimpleTimeZone class in Java Programming?
36.
Which Container method is used to cause a container to be laid out and redisplayed in Java Programming?
37.
What is the Properties class in Java Programming?
38.
What is the purpose of the Runtime class in Java Programming?
39.
What is the purpose of the System class in Java Programming?
40.
What is the purpose of the finally clause of a try-catch-finally statement in Java Programming?
41.
What is the Locale class in Java Programming?
42.
What must a class do to implement an interface in Java Programming?
43.
What is the purpose of the wait(), notify(), and notifyAll() methods in Java Programming?
44.
What is an abstract method in Java Programming?
45.
What are the high-level thread states in Java Programming?
46.
What is the difference between a static and a non-static inner class in Java Programming?
47.
What is an object's lock and which object's have locks in Java Programming?
48.
When can an object reference be cast to an interface reference in Java Programming?
49.
What is the difference between a Window and a Frame in Java Programming?
50.
What do heavy weight components mean in Java Programming?
51.
Which package has light weight components in Java Programming?
52.
What are peerless components in Java Programming?
53.
What is the difference between the Font and FontMetrics classes in Java Programming?
54.
What happens when a thread cannot acquire a lock on an object in Java Programming?
55.
What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy in Java Programming?
56.
What classes of exceptions may be caught by a catch clause in Java Programming?
57.
If a class is declared without any access modifiers, where may the class be accessed in Java Programming?
58.
What is the Map interface in Java Programming?
59.
Does a class inherit the constructors of its superclass in Java Programming?
60.
Name primitive Java types?
61.
Which class should you use to obtain design information about an object in Java Programming?
62.
How can a GUI component handle its own events in Java Programming?
63.
How are the elements of a GridBagLayout organized in Java Programming?
64.
What advantage do Java's layout managers provide over traditional windowing systems?
65.
What are the problems faced by Java programmers who don't use layout managers?
66.
What is the difference between static and non-static variables in Java Programming?
67.
What is the difference between the paint() and repaint() methods in Java Programming?
68.
What is the purpose of the File class in Java Programming?
69.
How does multithreading take place on a computer with a single CPU in Java Programming?
70.
What restrictions are placed on method overloading in Java Programming?
71.
What restrictions are placed on method overriding in Java Programming?
72.
What is casting in Java Programming?
73.
Name Container classes in Java Programming?
74.
What class allows you to read objects directly from a stream in Java Programming?
75.
How are this() and super() used with constructors in Java Programming?
76.
How is it possible in Java Programming for two String objects with identical values not to be equal under the == operator?
77.
What an I/O filter in Java Programming?
78.
What is the Set interface in Java Programming?
79.
What is the purpose of the enableEvents() method in Java Programming?
80.
Is Java a super set of JavaScript?
81.
What is a transient variable?
82.
Which containers use a border layout as their default layout?
83.
How are Observer and Observable used in Java Programming?
84.
What is synchronization and why is it important in Java Programming?
85.
What are synchronized methods and synchronized statements in Java Programming?
86.
What are three ways in which a thread can enter the waiting state in Java Programming?
87.
Can a lock be acquired on a class in Java Programming?
88.
What's new with the stop(), suspend() and resume() methods in JDK 1.2?
89.
What is the preferred size of a component in Java Programming?
90.
What method is used to specify a container's layout in Java Programming?
91.
Which containers use a FlowLayout as their default layout in Java Programming?
92.
What state does a thread enter when it terminates its processing in Java Programming?
93.
What is the Collections API in Java Programming?
94.
What is the List interface in Java Programming?
95.
How does Java handle integer overflows and underflows?
96.
What is the Vector class in Java Programming?
97.
What modifiers may be used with an inner class that is a member of an outer class in Java Programming?
98.
If a method is declared as protected, where may the method be accessed in Java Programming?
99.
What is an Iterator interface in Java Programming?
100.
How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters in Java Programming?
101.
What is the difference between yielding and sleeping in Java Programming?
102.
Is sizeof a keyword in Java Programming?
103.
What are wrapped classes in Java Programming?
104.
Does garbage collection guarantee that a program will not run out of memory?
105.
What is the difference between preemptive scheduling and time slicing in Java Programming?
106.
Name Component subclasses that support painting in Java Programming?
107.
What is a native method in Java Programming?
108.
How can you write a loop indefinitely in Java Programming?
109.
Can an anonymous class be declared as implementing an interface and extending a class in Java Programming?
110.
What is the purpose of finalization in Java Programming?
111.
Which class is the superclass for every class in Java Programming?
112.
What invokes a thread's run() method in Java Programming?
113.
What is the difference between the Boolean & operator and the && operator in Java Programming?
114.
What is the GregorianCalendar class in Java Programming?
115.
What is the SimpleTimeZone class in Java Programming?
116.
Which Container method is used to cause a container to be laid out and redisplayed in Java Programming?
117.
What is the Properties class in Java Programming?
118.
What is the purpose of the Runtime class in Java Programming?
119.
What is the purpose of the System class in Java Programming?
120.
What is the purpose of the finally clause of a try-catch-finally statement in Java Programming?
121.
What is the Locale class in Java Programming?
122.
What must a class do to implement an interface in Java Programming?
123.
What is the purpose of the wait(), notify(), and notifyAll() methods in Java Programming?
124.
What is an abstract method in Java Programming?
125.
What are the high-level thread states in Java Programming?
126.
What is the difference between a static and a non-static inner class in Java Programming?
127.
What is an object's lock and which object's have locks in Java Programming?
128.
When can an object reference be cast to an interface reference in Java Programming?
129.
What is the difference between a Window and a Frame in Java Programming?
130.
What do heavy weight components mean in Java Programming?
131.
Which package has light weight components in Java Programming?
132.
What are peerless components in Java Programming?
133.
What is the difference between the Font and FontMetrics classes in Java Programming?
134.
What happens when a thread cannot acquire a lock on an object in Java Programming?
135.
What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy in Java Programming?
136.
What classes of exceptions may be caught by a catch clause in Java Programming?
137.
If a class is declared without any access modifiers, where may the class be accessed in Java Programming?
138.
What is the Map interface in Java Programming?
139.
Does a class inherit the constructors of its superclass in Java Programming?
140.
Name primitive Java types?
141.
Which class should you use to obtain design information about an object in Java Programming?
142.
How can a GUI component handle its own events in Java Programming?
143.
How are the elements of a GridBagLayout organized in Java Programming?
144.
What advantage do Java's layout managers provide over traditional windowing systems?
145.
What are the problems faced by Java programmers who don't use layout managers?
146.
What is the difference between static and non-static variables in Java Programming?
147.
What is the difference between the paint() and repaint() methods in Java Programming?
148.
What is the purpose of the File class in Java Programming?
149.
How does multithreading take place on a computer with a single CPU in Java Programming?
150.
What restrictions are placed on method overloading in Java Programming?
151.
What restrictions are placed on method overriding in Java Programming?
152.
What is casting in Java Programming?
153.
Name Container classes in Java Programming?
154.
What class allows you to read objects directly from a stream in Java Programming?
155.
How are this() and super() used with constructors in Java Programming?
156.
How is it possible in Java Programming for two String objects with identical values not to be equal under the == operator?
157.
What an I/O filter in Java Programming?
158.
What is the Set interface in Java Programming?
159.
What is the purpose of the enableEvents() method in Java Programming?
160.
Is Java a super set of JavaScript?