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. All wrapper classes are defined in ___________






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






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






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






5. Variables that don't contain any data






6. Cast operator has _________ precedence to division






7. Count++; count--






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






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






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






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






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






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






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






15. Expressed in a Java program with single quotes






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






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






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






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






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






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






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






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






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






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






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






27. Represents either a primitive value or an object






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






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






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






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






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






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






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






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






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






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






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






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






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






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






42. Returns all input remaining on the current line as a character string.






43. Returns the number of characters in this stirng.






44. Two floating data types: float - _______






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






46. ______________ operators have higher precedence






47. Variables and constants can be referenced in any method of the class by declaring at the _________






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






49. Methods in the Math class are ______






50. When a variable is declared inside a method