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






2. Returns the character at the specified index.






3. Variables and constants can be referenced in any method of the class by declaring at the _________






4. Elements of input






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






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






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






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






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






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






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






12. Only two valid values: true and false; can indicate whether a particular condition is true - but can also be used to represent any situation that has two states - such as a light bulb being on or off






13. Variables that don't contain any data






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






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






16. Returns the number of characters in this stirng.






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






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






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






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






21. Widening byte: _________ - to int - to long - to float - to double






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






23. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.






24. Delimited by double quotation characters






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






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






27. sides=10;






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






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






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






31. Two floating data types: float - _______






32. Before you use a variable __________it






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






34. _____ expression evaluated first






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






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






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






38. Methods in the Math class are ______






39. Returns the next input token as a character string.






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






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






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






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






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






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






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






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






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






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






50. The order in which statements are executed in a running program