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 name for a location in memory used to hold a data value.






2. Represents either a primitive value or an object






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






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






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






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






7. Part of the java.util class; picks a number at random out of a range of values.






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






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






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






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






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






15. Two floating data types: float - _______






16. Returns the next input token as a character string.






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






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






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






20. They clarify the role a certain number has in the program.






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






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






23. A ________________ is immutable.






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






25. Protection and management of an object's info. this implies that the object should be self-governing. the only changes made to the state of the object should be accomplished by that object's methods. other objects should not be able to "reach in" to






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






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






28. When a variable is declared inside a method






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






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






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






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






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






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






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






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






37. Expressed in a Java program with single quotes






38. The blueprint of an object. establishes the kind of data an object of that type will hold and defines the methods that represent the behavior of such objects. however - a class contains no space to store data. each object has space for its own data -






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






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






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






42. Before you use a variable __________it






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






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






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






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






47. Sets the scanner's delimiting pattern.






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






49. _____ expression evaluated first






50. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.