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. Constants are ______ because the can't be changed once you use the final modifier






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






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






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






5. Represents either a primitive value or an object






6. Only two valid values: true and false; can indicate whether a particular condition is true - but can also be used to represent any situation that has two states - such as a light bulb being on or off






7. Sets the scanner's delimiting pattern.






8. Elements of input






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






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






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






12. ______________ operators have higher precedence






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






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






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






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






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






18. Two floating data types: float - _______






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






20. Constructor: creates a new pseudorandom number generator.






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






22. Delimited by double quotation characters






23. Variables that don't contain any data






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






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






26. sides=10;






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






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






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






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






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






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






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






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






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






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






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






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






39. Widening byte: _________ - to int - to long - to float - to double






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






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






42. The classes of the Java standard class library are grouped into __________.






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






44. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked






45. Making it difficult - if not impossible - for code outside of a class to "reach in" and chnage the value of a variable that is declared inside that class.






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






47. Before you use a variable __________it






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






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






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