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. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.






3. ______________ operators have higher precedence






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






5. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________






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






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






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






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






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






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






12. Returns the int corresponding to the value stored in the specified string






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






14. The location at which a variable is declared defines its scope - which is the area within a program in which the variable can be referenced.






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






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






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






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






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






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






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






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






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






24. Constructor: creates a new pseudorandom number generator.






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






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






27. The one that is invoked






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






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






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






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






32. Instance data should be defined with what________ visibility






33. Declared in a class but not inside any particular method






34. _____ expression evaluated first






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






36. Elements of input






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






38. When a variable is declared inside a method






39. Begins with a backslash character ""






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






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






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






43. A value that is passed into a method when it is invoked






44. Attempts to find the next occurence of the specified pattern - ignoring delimiters






45. Methods in the Math class are ______






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






47. Expressed in a Java program with single quotes






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






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






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