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. When a variable is declared inside a method






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






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






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






5. An explicit data value used in a program






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






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






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






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






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






11. Constructor: creates a new pseudorandom number generator.






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






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






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






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






16. If the string object str holds the string "987" - the following line of code converts the string into the integer variable 987 and stores that value in the int variable num:






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






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






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






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






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






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






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






24. Returns the number of characters in this stirng.






25. Begins with a backslash character ""






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






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






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






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






30. All wrapper classes are defined in ___________






31. The Scanner class is part of ___________________






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






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






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






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






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






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






38. Sets the scanner's delimiting pattern.






39. Count++; count--






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






41. Variables that don't contain any data






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






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






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






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






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






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






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






49. The names of the parameters in the header of the method declaration






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