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 IEEE standard does using strictfp conform to?






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


3. Enums can be declared...






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






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






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






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






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






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






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






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






12. What is the purpose of an Enum?






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






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






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






16. What modifiers can you use with method parameters?






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


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


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


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


21. Enums cannot be declared inside...






22. An instance variable cannot be marked...






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


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






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






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


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






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






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






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






31. An ________cannot be static?






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






33. Can an abstract class have a final method?






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






35. Local ________ can be marked final






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


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






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


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






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






41. An interface method cannot be...






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






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






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






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






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






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






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






49. When are class instance variables instantiated?






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