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






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






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






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






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






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






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






8. Returns the number of characters in this stirng.






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






10. Before you use a variable __________it






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






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






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






14. The one that is invoked






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






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






17. ++count; -- count






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






19. When a variable is declared inside a method






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






21. Constructor: creates a new pseudorandom number generator.






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






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






24. Count++; count--






25. Boolean type conversions are ___________






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






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






28. The location at which a variable is declared defines its scope - which is the area within a program in which the variable can be referenced.






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






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






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






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






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






34. Two floating data types: float - _______






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






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






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






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






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






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






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






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






43. An explicit data value used in a program






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






45. The Scanner class is part of ___________________






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






47. Instance data should be defined with what________ visibility






48. A method that returns a value must have a _________






49. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.






50. Expressed in a Java program with single quotes