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. Protection and management of an object's info. this implies that the object should be self-governing. the only changes made to the state of the object should be accomplished by that object's methods. other objects should not be able to "reach in" to






2. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.






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






4. An explicit data value used in a program






5. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)






6. The values passed into a method in an invocation; these are called the arguments to the method






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






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






9. When a variable is declared inside a method






10. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)






11. All numeric types are _______ - meaning both positive and negative values can be stored in them






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






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






14. They clarify the role a certain number has in the program.






15. Boolean type conversions are ___________






16. Two categories of statements that control the flow of executing through a method: __________ and loops






17. Returns the next input token as a character string.






18. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type






19. Variables and constants can be referenced in any method of the class by declaring at the _________






20. Modifier>type/void>identifier>parameters>method body






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






22. The blueprint of an object. establishes the kind of data an object of that type will hold and defines the methods that represent the behavior of such objects. however - a class contains no space to store data. each object has space for its own data -






23. Returns a new string consisting of this string concatenated with str.






24. If the string object str holds the string "987" - the following line of code converts the string into the integer variable 987 and stores that value in the int variable num:






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






26. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.






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






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






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






30. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar






31. Count++; count--






32. Cast operator has _________ precedence to division






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






34. The one that is invoked






35. A ________________ is immutable.






36. A value that is passed into a method when it is invoked






37. ______________ operators have higher precedence






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






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






40. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.






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






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






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






44. The act of creating an object using the "new" operator






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






46. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.






47. Defined and then used as the type of a variable when it is declared; establishes all possible values of a variable of that type by listing - or enumerating - them.






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. Begins with a backslash character ""






50. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight