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 purpose of making a class 'abstract'?






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

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


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






4. An ________ variable cannot be marked strictfp






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






6. At what point will you get an error if an interface method is 'protected' or 'private'?






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






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

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


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






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






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






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






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






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






15. Enums can be declared...






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






17. When would you get an error for a class declaration as follows and why? - protected class Me { }

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


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






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






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






21. 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


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






23. Can an abstract class have a final method?






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






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






26. Local ________ can be marked final






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






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






29. What IEEE standard does using strictfp conform to?






30. What modifiers can you use with method parameters?






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






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






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






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






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






36. 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


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






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






39. What Java version began allowing an Enum type?






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






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






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






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






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






45. What is the syntax for declaring multiple variables on one line?






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






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






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

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


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






50. 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