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. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight






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






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






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






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






6. Expressed in a Java program with single quotes






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






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






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






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






11. Constructor: creates a new pseudorandom number generator.






12. _____ expression evaluated first






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






14. Represents either a primitive value or an object






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






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






17. ++count; -- count






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






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






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






21. Sets the scanner's delimiting pattern.






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






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






24. An explicit data value used in a program






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






40. When a variable is declared inside a method






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






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






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






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






45. Variables that don't contain any data






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






47. ______________ operators have higher precedence






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






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






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