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 a file have no public classes?






2. An ________cannot be static?






3. What are the eight primitive types in Java?






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






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






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






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






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






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






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






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

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


12. How many interfaces can a class implement?

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


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






14. Can an abstract class have a final method?






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






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






17. How many arguments can an Enum constructor have?






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






19. An ________ variable cannot be marked strictfp






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






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






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






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






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

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


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






26. When are class instance variables instantiated?






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






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






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

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


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






31. What is the purpose of an Enum?






32. An interface method cannot be...






33. The following field is defined in an interface. What do we know about it's access and non-access modifiers? int aNumber = 59;

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


34. Local ________ can be marked final






35. An instance variable cannot be...






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






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






38. Enums can be declared...






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






40. You cannot _____ a static method






41. An instance variable cannot be marked...






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






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






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






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






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

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


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






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






49. Enums cannot be declared inside...






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