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. Constructor: creates a new pseudorandom number generator.






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






3. Elements of input






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






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






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






7. All wrapper classes are defined in ___________






8. A name for a location in memory used to hold a data value.






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






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






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






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






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






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






15. The one that is invoked






16. Variables that don't contain any data






17. Returns the character at the specified index.






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






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






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






21. ++count; -- count






22. When a variable is declared inside a method






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






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






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






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






27. The Scanner class is part of ___________________






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






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






30. Instance data should be defined with what________ visibility






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






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






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






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






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






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






37. Each piece of data that we send to a method






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






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






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






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






42. Count++; count--






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






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






45. A ________________ is immutable.






46. Two floating data types: float - _______






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






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






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






50. Cast operator has _________ precedence to division