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. Occurs automatically when certain operators need to modify their opeands in order to perform the operation






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






3. All wrapper classes are defined in ___________






4. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.






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






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






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






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






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






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






11. Sets the scanner's delimiting pattern.






12. sides=10;






13. Variables that don't contain any data






14. Methods in the Math class are ______






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






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






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






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






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






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






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






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






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






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






26. Boolean type conversions are ___________






27. A ________________ is immutable.






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






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






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






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






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






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






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






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






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






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






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






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






40. Returns the character at the specified index.






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






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






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






44. Also called a selection statement b/c it allows us to choose which statement will be executed next.






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






46. Before you use a variable __________it






47. Expressed in a Java program with single quotes






48. ++count; -- count






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






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