Sunday, October 28, 2018

Core Java Interview Questions

Hide Answers

1.what  is a transient variable? 

 2.which containers use a border Layout as their default layout? 

3.Why do threads block on I/O? 

4. How are Observer and Observable used?

5. What is synchronization and why is it important? 

6. Can a lock be acquired on a class? 

7. What's new with the stop(), suspend() and resume() methods in JDK 1.2? 

8. Is null a keyword? 

9. What is the preferred size of a component? 

10. What method is used to specify a container's layout? 

11. Which containers use a FlowLayout as their default layout? 

12. What state does a thread enter when it terminates its processing? 

13. What is the Collections API? 

14. Which characters may be used as the second character of an identifier,  but not as the first character of an identifier? 

15. What is the List interface? 

16. How does Java handle integer overflow and underflow?

  17. What is the Vector class? 

  18. What modifiers may be used with an inner class that is a member of an outer class?

19. What is an Iterator interface? 

20. What is the difference between the >> and >>> operators? 

21. Which method of the Component class is used to set the position and  size of a component?  

22. How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters? 

23.What is the difference between yielding and sleeping? 

24. Which java.util classes and interfaces support event handling?

25. Is sizeof a keyword? 

26. What are wrapped classes? 

27. Does garbage collection guarantee that a program will not run out of memory? 

28. What restrictions are placed on the location of a package statement  within a source code file? 

29. Can an object's finalize() method be invoked while it is reachable? 

30. What is the immediate superclass of the Applet class? 

31. What is the difference between preemptive scheduling and time slicing? 

32. Name three Component subclasses that support painting. 

33. What value does readLine() return when it has reached the end of a file? 

35. What is clipping? 

36. What is a native method? 

37. Can a for statement loop indefinitely?

38. What are order of precedence and associativity, and how are they used? 

39. When a thread blocks on I/O, what state does it enter? 

40. To what value is a variable of the String type automatically initialized? 

41. What is the catch or declare rule for method declarations?

42. What is the difference between a MenuItem and a CheckboxMenuItem? 

43. What is a task's priority and how is it used in scheduling? 

44. What class is the top of the AWT event hierarchy? 

45. When a thread is created and started, what is its initial state? 

46. Can an anonymous class be declared as implementing an interface and extending a class? 

47. What is the range of the short type? 

48. What is the range of the char type? 

49. In which package are most of the AWT events that support the event-delegation  model defined?

50. What is the immediate superclass of Menu? 

Hide Answers

No comments:

Post a Comment