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. The order in which statements are executed in a running program






2. ______________ operators have higher precedence






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






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






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






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






7. White space characters such as space characters - tabs - and new lines that separate the elements of input






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






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






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






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






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






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






14. Expressed in a Java program with single quotes






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






16. Delimited by double quotation characters






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






18. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.






19. Methods in the Math class are ______






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






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. Returns a string containing the specified number formatted according to this object's pattern.






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






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






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






26. Returns the character at the specified index.






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






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






29. All wrapper classes are defined in ___________






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






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






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






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






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






35. Cast operator has _________ precedence to division






36. Defined and then used as the type of a variable when it is declared; establishes all possible values of a variable of that type by listing - or enumerating - them.






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






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






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






40. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)






41. Begins with a backslash character ""






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






43. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.






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






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






46. Elements of input






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






48. When a variable is declared inside a method






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






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