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. Sets the scanner's delimiting pattern.






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






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






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






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






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






7. System.out object represents an output device or file; we send the println message to the System.out object to request that some text be printed






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






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. Also called a selection statement b/c it allows us to choose which statement will be executed next.






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






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






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






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






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






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






17. Variables that don't contain any data






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






19. The Scanner class is part of ___________________






20. Elements of input






21. Boolean type conversions are ___________






22. When a variable is declared inside a method






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






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






25. Cast operator has _________ precedence to division






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






27. ______________ operators have higher precedence






28. The one that is invoked






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






30. Before you use a variable __________it






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






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






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






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






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






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






37. The idea that we can refer to multiple types of related objects over time in consistent ways. it gives us the ability to design powerful and elegant solutions to problems that deal with multiple objects.






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






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






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






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






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






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






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






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






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






47. Constructor: creates a new pseudorandom number generator.






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






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






50. A ________________ is immutable.