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 is the purpose of making a method 'native'?






2. Can an abstract class have a final method?






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






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


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






6. What IEEE standard does using strictfp conform to?






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






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






9. An instance variable cannot be marked...






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






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






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






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


14. Enums can be declared...






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






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


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


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






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






20. An instance variable cannot be...






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






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






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






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


25. An ________cannot be static?






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






27. What Java version began allowing an Enum type?






28. An interface method cannot be...






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






30. What modifiers can you use with method parameters?






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






32. You cannot _____ a static method






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






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






35. How many classes can a class extend?






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


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






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






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






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






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






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






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






44. How many arguments can an Enum constructor have?






45. What are the eight primitive types in Java?






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






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


48. Can a file have no public classes?






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






50. What occurs when a class is marked as '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