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. This declaration creates a Scanner object that reads input from the keyboard






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






3. Methods in the Math class are ______






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






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






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






7. Constructor: creates a new pseudorandom number generator.






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






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






11. Delimited by double quotation characters






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






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






14. The one that is invoked






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






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






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






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






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






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






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






22. An explicit data value used in a program






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






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






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






26. A ________________ is immutable.






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






28. ______________ operators have higher precedence






29. Occurs automatically when certain operators need to modify their opeands in order to perform the operation






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






31. Return type specified in the method header can be a primitive type - class name or the ________; when a method does not return any value - void is used as the return type - as is always done with the main method.






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






33. Boolean type conversions are ___________






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






35. Returns the int corresponding to the value stored in the specified string






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






37. _____ expression evaluated first






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






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






40. Modifier>type/void>identifier>parameters>method body






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






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






43. Count++; count--






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






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






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






47. Instance data should be defined with what________ visibility






48. A class usually provides services to access and modify __________






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






50. Variables that don't contain any data