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. Where can the brackets for an array declaration go?






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






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






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






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






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


7. What is the purpose of an Enum?






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






9. What modifiers can you use with method parameters?






10. Enums cannot be declared inside...






11. Enums can be declared...






12. An ________cannot be static?






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






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


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






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


17. When are class instance variables instantiated?






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






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






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






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






22. What Java version began allowing an Enum type?






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






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


25. An instance variable cannot be...






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






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


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






29. Can an abstract class have a final method?






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






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






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






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






34. Where do var-args have to appear on the method parameter list?






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






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






37. You cannot _____ a static method






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


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






40. How many classes can a class extend?






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


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






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






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






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






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






47. Can a file have no public classes?






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


49. Local ________ can be marked final






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






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