Test your basic knowledge |

Object Oriented Programming

Subject : it-skills
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. Control access to the members of a class. the reserved words public and private are visibility modifiers that can be applied to the variables and methods of a class.






2. The automatic conversion between a primitive value and a corresponding wrapper object.






3. format for constants: all upper-case; separated by ________






4. After an object has been instantiated - we set the _________ to access its methods






5. Returns true if the scanner has anotehr token in its input.






6. In the header of a method specifies he types of the values that are passed and the names by which the called method will refer to those values.






7. Methods in the Math class are ______






8. Returns the character at the specified index.






9. Part of the java.util class; picks a number at random out of a range of values.






10. Constructors do not even _______; therefore they cannot return a value.






11. Return type specified in the method header can be a primitive type - class name or the ________; when a method does not return any value - void is used as the return type - as is always done with the main method.






12. Changes a particular value - e.g.setX - where X is the value they are setting.






13. ____________ is instantiated in the traditional way using the new operator.






14. A set of classes that supports the development of programs






15. Since an object ref var holds the address of the object - it can be thought of as a ____ to the location in memory where the object is held






16. Part of the standard Java class library - provides convenient methods for reading input values of various types. the input can come from various sources - including data typed interactively by the user or data stored in a file; the Scanner class can






17. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.






18. We use an object when we have a _________ to it






19. The order in which statements are executed in a running program






20. Boolean type conversions are ___________






21. Delimited by double quotation characters






22. Elements of input






23. Provide various methods related to the management of the associated primitive type. Used when we create an object that serves as a container to hold various types of other objects - and we want the object to hold a simple integer value. In this case






24. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.






25. _____ expression evaluated first






26. White space characters such as space characters - tabs - and new lines that separate the elements of input






27. The Scanner class is part of ___________________






28. Attempts to find the next occurence of the specified pattern - ignoring delimiters






29. Constructor: creates a new string object with the same characters as str.






30. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.






31. A group of programming statements that is given a name. when a method is invoked - its statements are executed. a set of methods is associated with an object and defines its potential behaviors. to define the ability to make a deposit into a bank acc






32. System.out object represents an output device or file; we send the println message to the System.out object to request that some text be printed






33. A null reference indicates that a variable does not refer to an object






34. Constructor: creates a new pseudorandom number generator.






35. Instance data should be defined with what________ visibility






36. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.






37. Every object has two things: a state and a _____ of behaviors






38. Variables that don't contain any data






39. New memory space is reserved for that variable every time an instance of the class that is created.






40. Two floating data types: float - _______






41. Returns all input remaining on the current line as a character string.






42. An object has behaviors - which are defined by the ________ associated with that object.






43. Returns a string containing the specified number formatted according to this object's pattern.






44. When two variables contain the same address and therefore refer to the same object; one important implication of _________ is that when we use one ref to change an object - it is also changed for the other reference because there is really only one o






45. ______________ operators have higher precedence






46. When a variable is declared inside a method






47. Four integer data types: byte - short - int - _____






48. Instructs the compiler to reserve a portion of main memory space large enough to hold a particular type of value and indicates the name by which we refer to that location






49. The idea that we can refer to multiple types of related objects over time in consistent ways. it gives us the ability to design powerful and elegant solutions to problems that deal with multiple objects.






50. Returns the number of characters in this stirng.