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






2. All wrapper classes are defined in ___________






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






4. format for constants: all upper-case; separated by ________






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






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






7. Returns the character at the specified index.






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






9. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.






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






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






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. The automatic conversion between a primitive value and a corresponding wrapper object.






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






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






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






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






18. Expressed in a Java program with single quotes






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






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






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






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






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






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






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






26. The one that is invoked






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






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






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






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






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






33. Making it difficult - if not impossible - for code outside of a class to "reach in" and chnage the value of a variable that is declared inside that class.






34. ______________ operators have higher precedence






35. Changes a particular value - e.g.setX - where X is the value they are setting.






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






37. Two floating data types: float - _______






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






39. An explicit data value used in a program






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






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






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






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






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






45. Sets the scanner's delimiting pattern.






46. Constructor: creates a new pseudorandom number generator.






47. Variables that don't contain any data






48. Boolean type conversions are ___________






49. A set of classes that supports the development of programs






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