Test your basic knowledge |

Oracle Sun Certified Java Programmer

Instructions:
  • Answer 50 questions in 15 minutes.
  • If you are not ready to take this test, you can study here.
  • Match each statement with the correct term.
  • Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.

This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. What is the syntax for declaring multiple variables on one line?






2. If an Enum has a constructor - can you call that constructor?






3. An original method that will be overriden by a class in the same package as the original could have what access levels and still be considered an 'override'?






4. Where can the brackets for an array declaration go?






5. When overriding a method - the return type must be what?


6. Calling what method will return an Array of Enum values?






7. You cannot _____ a static method






8. What modifiers can you use with method parameters?






9. Where do var-args have to appear on the method parameter list?






10. An ________ variable cannot be marked strictfp






11. Enums cannot be declared inside...






12. An ________cannot be static?






13. Enums can be declared outside a Class - but in...






14. What are the only two access modifiers valid for a Class?






15. How many classes can a class extend?






16. Enums can be declared...






17. What is the purpose of making a field 'volatile'?


18. Can an abstract class have a final method?






19. How many interfaces can a class implement?


20. How many var-arg's can you have in a method signature?






21. If a class is abstract - do the methods which ares supposed to be abstract too need to be marked 'abstract'?


22. How many bits does a primitive 'double' hold?






23. Where in the source code must a 'package' statement be?






24. Can a subclass see and use inherited 'private' methods and fields?


25. What access level does the following interface method have? void getSomething(); public.


26. When are class instance variables instantiated?






27. Is this identifier name valid? Why or why not? int 34myVar-Yes;






28. Can you make an overriding method more access restrictive (public to private) or less restrictive (private to public)?






29. What are the eight primitive types in Java?






30. An instance variable cannot be...






31. What is the basic construction for calling an Enum value?






32. Can a private method be overriden by a subclass?


33. What must you do when extending an abstract class or implementing any interface?






34. What is the purpose of making a method 'native'?






35. What is the length in bytes of type 'long' - and what is it's maximum size?






36. What IEEE standard does using strictfp conform to?






37. An interface cannot extend any extendable (non-final) class - can only...






38. What are the built-in methods for class Object?






39. When overriding a method - the argument list (i.e. signature) must be what?






40. What is the purpose of making a class 'abstract'?






41. What three non-access modifiers can be used with a class declaration?






42. What kind of error (run-time or compile) do you get when trying to extend a final class?






43. What are the rules for checked exceptions in overriding a method?






44. A reference variable can be reassigned to another object that is of the same type. It can also be reassigned to a supertype or subtype of the original type?






45. Does an override have to throw all the exceptions of the original method?






46. How many public classes can be defined in one source code file?






47. All fields in an interface must have what three access & non-access modifiers?






48. How many non public classes can be in any one file?






49. What is the length in bytes of type 'int' - and what is it's maximum size?






50. What is a 'constant specific class body' and where can you use it?