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. Returns a new string consisting of this string concatenated with str.






2. An object in Java - defined by the class String






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






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






5. Returns the character at the specified index.






6. Instance data should be defined with what________ visibility






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






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






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






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






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






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






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






14. _____ expression evaluated first






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






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






17. All wrapper classes are defined in ___________






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






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






20. Defined and then used as the type of a variable when it is declared; establishes all possible values of a variable of that type by listing - or enumerating - them.






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






22. ______________ operators have higher precedence






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






24. Expressed in a Java program with single quotes






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






26. Sets the scanner's delimiting pattern.






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






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






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






30. Constructor: creates a new pseudorandom number generator.






31. A ________________ is immutable.






32. Elements of input






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






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






35. Methods in the Math class are ______






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






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






38. Every object has two things: a state and a _____ of behaviors






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






40. Boolean type conversions are ___________






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






42. The one that is invoked






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






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






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






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






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






48. When a variable is declared inside a method






49. An explicit data value used in a program






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