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. A variable that refers to an object must be __________






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






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






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






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






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






7. The declarations of object variables have a similar structure to the declaration of _______________






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






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






10. Sets the scanner's delimiting pattern.






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






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






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






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






15. Delimited by double quotation characters






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






17. The one that is invoked






18. Two floating data types: float - _______






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






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






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






22. Methods in the Math class are ______






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






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






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






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






27. This declaration creates a Scanner object that reads input from the keyboard






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






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






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






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






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






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






34. Returns the number of characters in this stirng.






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






36. Count++; count--






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






38. Represents either a primitive value or an object






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






40. An explicit data value used in a program






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






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






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






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






45. A Java operator that is specified by a type name in parentheses; truncates rather than rounds; useful in division if u want an integer to be treated as a float or double






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






47. Five steps of problem-solving: ____________ the problem - Designing a solution - Considering alternatives to the solution and refining the solution - Implementing the solution - Testing the solution and fixing any problems that exist






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






49. Variables that don't contain any data






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