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






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






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






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






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






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






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






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






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






10. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.






11. Begins with a backslash character ""






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






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






14. When a variable is declared inside a method






15. Occurs when a value of one type is assigned to a variable of another type during which the value is converted to the new type.






16. Two floating data types: float - _______






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






18. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.






19. An explicit data value used in a program






20. Returns the character at the specified index.






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






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






23. ______________ operators have higher precedence






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






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






26. The one that is invoked






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






28. Expressed in a Java program with single quotes






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






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






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






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






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






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






35. _____ expression evaluated first






36. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type






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






38. Delimited by double quotation characters






39. Elements of input






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






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






42. Part of the java.util class; picks a number at random out of a range of values.






43. A null reference indicates that a variable does not refer to an object






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






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






46. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked






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






48. Returns a string containing the specified number formatted according to this object's pattern.






49. All wrapper classes are defined in ___________






50. Returns the number of characters in this stirng.