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. Constructors do not even _______; therefore they cannot return a value.






2. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;






3. Cast operator has _________ precedence to division






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






5. An explicit data value used in a program






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






7. A variable that refers to an object must be __________






8. Declared in a class but not inside any particular method






9. Returns the int corresponding to the value stored in the specified string






10. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.






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






12. Returns the character at the specified index.






13. An object in Java - defined by the class String






14. Two floating data types: float - _______






15. Instance data should be defined with what________ visibility






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






17. Constants are ______ because the can't be changed once you use the final modifier






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






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






20. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.






21. Occurs automatically when certain operators need to modify their opeands in order to perform the operation






22. Constructor: creates a new pseudorandom number generator.






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






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






25. All wrapper classes are defined in ___________






26. Delimited by double quotation characters






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






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






29. Variables that don't contain any data






30. Each piece of data that we send to a method






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






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






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






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






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






36. ++count; -- count






37. The values it stores internally - which may be represented as primitive data or as other objects. for example - a bank account object can store a floating point number (a primitive value) that represents the balance of the account. it can also contai






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






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






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






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






42. A special method that has the same name as the class. After the "new" operator creates the object it is invoked to help set it up initially






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






44. declaration that creates a String variable that holds a reference to a String object; an object variable doesn't hold an object itself - it holds the address of an object






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






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






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






48. Represents either a primitive value or an object






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






50. Occurs when a value of one type is assigned to a variable of another type during which the value is converted to the new type.