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. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.






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






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






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






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






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






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






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






9. The one that is invoked






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






11. Returns the number of characters in this stirng.






12. Constructor: creates a new pseudorandom number generator.






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






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






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






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






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






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






19. A name for a location in memory used to hold a data value.






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






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






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






23. Sets the scanner's delimiting pattern.






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






25. Constructors do not even _______; therefore they cannot return a value.






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






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






28. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type






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






30. Instance data should be defined with what________ visibility






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






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






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






34. sides=10;






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






36. Attempts to find the next occurence of the specified pattern - ignoring delimiters






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






38. Expressed in a Java program with single quotes






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






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






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






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






43. Three ways in which Java conversions occur: _________ conversion - promotion - casting






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






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






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






47. Returns a string containing the specified number formatted according to this object's pattern.






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






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






50. ++count; -- count