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






2. Before you use a variable __________it






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






4. Returns the next input token as the indicated type.






5. Returns the number of characters in this stirng.






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






7. Represents either a primitive value or an object






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






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






10. Cast operator has _________ precedence to division






11. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________






12. Constructor: creates a new pseudorandom number generator.






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






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






15. Delimited by double quotation characters






16. A name for a location in memory used to hold a data value.






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






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






19. A ____________ and definition always give the parameter list in parentheses after the method name. if there are no parameters - an empty set of parentheses is used






20. sides=10;






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






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






23. A class usually provides services to access and modify __________






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






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






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






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






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






29. ______________ operators have higher precedence






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






31. When a variable is declared inside a method






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






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






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






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






36. A combo of one or more operators and operands that usually perform a calculation; operands can be literals - constants - variables - or other sources of data






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






38. Two floating data types: float - _______






39. How classes are created from other classes. the definition of one class can be based on another class that already exists. inheritance is a form of software reuse - capitalizing on the similarities between various kinds of classes that we want to cre






40. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.






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






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






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






44. A ________________ is immutable.






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






46. Also called a selection statement b/c it allows us to choose which statement will be executed next.






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






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






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






50. Returns the next input token as the indicated type.