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


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


3. An instance variable cannot be...






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






5. An interface method cannot be...






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






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






8. When accessing an object you really don't have access to (it's 'private' or 'default' in another package - etc) - when will you get an error: at compilation or at run-time?

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


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






10. Can an abstract class have a final method?






11. What is the effect of making a method argument final?






12. You cannot _____ a static method






13. Enums can be declared...






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






30. What Java version began allowing an Enum type?






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






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






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






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






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






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






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






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






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






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






41. What are the eight primitive types in Java?






42. Do Enums have to be within an existing class?






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






44. When are class instance variables instantiated?






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






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


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

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


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






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






50. Local ________ can be marked final







Sorry!:) No result found.

Can you answer 50 questions in 15 minutes?


Let me suggest you:



Major Subjects



Tests & Exams


AP
CLEP
DSST
GRE
SAT
GMAT

Most popular tests