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. Can multiple non-primitive variables be defined in one line?






2. Which of the three non-access modifiers (strictfp - final - abstract) can and can't be used together in a class declaration?


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






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






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






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






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






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






9. An instance variable cannot be...






10. An ________cannot be static?






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






12. How many arguments can an Enum constructor have?






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






14. How many bits does a primitive 'float' hold?






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






16. What is the most basic construction for an Enum?






17. What is the purpose of an Enum?






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






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


20. An ________ variable cannot be marked strictfp






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






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


23. Can a file have no public classes?






24. When you try to use a method that you don't have access to (due to 'private' etc) - when do you get an error?






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






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






27. For any method to be abstract - what must also be true about the class?






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






29. Var-args have been possible since what Java version?






30. If a class's public class declaration is something like - 'public class HiThereSally {' - what must the source code file be named? Why?






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






32. When are class instance variables instantiated?






33. Once a reference variable is defined - can it's object type be changed?






34. What is the proper syntax for declaring a var-arg in a method signature?






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


36. All methods in an Interface are what by default?






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






38. What modifiers can you use with method parameters?






39. What are the eight primitive types in Java?






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






41. What are the seven non-access modifiers for methods?






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






43. How many interfaces can a class implement?


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






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






46. How many classes can a class extend?






47. An instance variable cannot be marked...






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






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






50. An interface method cannot be modified as...