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






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






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






4. Delimited by double quotation characters






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






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






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






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






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






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






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






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






13. Represents either a primitive value or an object






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






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






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






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






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






19. Two floating data types: float - _______






20. ++count; -- count






21. The names of the parameters in the header of the method declaration






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






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






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






25. The one that is invoked






26. ______________ operators have higher precedence






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






28. Before you use a variable __________it






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






30. Part of the standard Java class library - provides convenient methods for reading input values of various types. the input can come from various sources - including data typed interactively by the user or data stored in a file; the Scanner class can






31. Expressed in a Java program with single quotes






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






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






34. Begins with a backslash character ""






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






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






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






38. Elements of input






39. Count++; count--






40. Sets the scanner's delimiting pattern.






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






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






43. Constructor: creates a new pseudorandom number generator.






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






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






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






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






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






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






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