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. All methods in an Interface are what by default?






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






3. How many arguments can an Enum constructor have?






4. What occurs when a class is marked as 'final'?






5. Putting abstract and final in the class declaration will give you a run-time or compile time error?






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






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






8. What Java version began allowing an Enum type?






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






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






11. Can multiple non-primitive variables be defined in one line?






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






13. What modifiers can you use with method parameters?






14. An interface method cannot be...






15. What IEEE standard does using strictfp conform to?






16. When are class instance variables instantiated?






17. What are the eight primitive types in Java?






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






19. A class is access modified as default. It's methods are access modified as 'public'. What other class files can access the methods in this class?






20. Enums can be declared...






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






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






23. What is the code format for an abstract method?






24. Local ________ can be marked final






25. 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?






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






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






28. Is this identifier name valid? Why or why not? int $_myVar;






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






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






31. What is the purpose of an Enum?






32. An ________cannot be static?






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






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


35. What is the purpose of making a method 'synchronized'?






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


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






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






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


40. An instance variable cannot be...






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


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






43. An ________ variable cannot be marked strictfp






44. What kinds of exceptions can an overriding method throw that the original does not have?






45. Can an abstract class have a final method?






46. What is the purpose of making a field 'transient'?






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






48. 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'?






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






50. How many classes can a class extend?