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. Does an override have to throw all the exceptions of the original method?






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






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






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






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


7. An interface method cannot be...






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






9. What kind of error (run-time or compile) do you get when trying to extend a final class?






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


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






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


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






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






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






16. What is the purpose of an Enum?






17. What Java version began allowing an Enum type?






18. An ________cannot be static?






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






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






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






22. Can a private method be overriden by a subclass?


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






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






25. When overriding a method - the return type must be what?


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






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






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






29. What modifiers can you use with method parameters?






30. Local ________ can be marked final






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






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






33. An instance variable cannot be...






34. When are class instance variables instantiated?






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






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






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






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






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






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






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






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






43. How many arguments can an Enum constructor have?






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






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






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






47. The following field is defined in an interface. What do we know about it's access and non-access modifiers? int aNumber = 59;


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






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






50. Can a file have no public classes?