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. Three ways in which Java conversions occur: _________ conversion - promotion - casting






2. Count++; count--






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






4. Represents either a primitive value or an object






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






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






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






8. Provide various methods related to the management of the associated primitive type. Used when we create an object that serves as a container to hold various types of other objects - and we want the object to hold a simple integer value. In this case






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






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






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






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






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






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






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






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






17. Begins with a backslash character ""






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






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






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






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






22. Boolean type conversions are ___________






23. Variables that don't contain any data






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






25. _____ expression evaluated first






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






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






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






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






30. Methods in the Math class are ______






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






49. Expressed in a Java program with single quotes






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