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 do var-args have to appear on the method parameter list?






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






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






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






5. What is the purpose of an Enum?






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






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






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






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






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


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






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


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






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






15. How many classes can a class extend?






16. What modifiers can you use with method parameters?






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






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






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






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






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


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






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






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


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






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


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






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






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






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






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






32. Local ________ can be marked final






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






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






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






36. What IEEE standard does using strictfp conform to?






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






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






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






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






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






42. Can a file have no public classes?






43. An instance variable cannot be...






44. You cannot _____ a static method






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






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






47. How many arguments can an Enum constructor have?






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






49. An ________cannot be static?






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