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. This declaration creates a Scanner object that reads input from the keyboard






2. Expressed in a Java program with single quotes






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






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






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






6. ______________ operators have higher precedence






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






8. Sets the scanner's delimiting pattern.






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






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






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






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






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






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






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






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






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






18. Boolean type conversions are ___________






19. Returns the number of characters in this stirng.






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






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






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






23. Constructor: creates a new pseudorandom number generator.






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






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






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






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






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






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






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






31. Begins with a backslash character ""






32. The idea that we can refer to multiple types of related objects over time in consistent ways. it gives us the ability to design powerful and elegant solutions to problems that deal with multiple objects.






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






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






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






36. _____ expression evaluated first






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






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






39. All wrapper classes are defined in ___________






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. Modifier>type/void>identifier>parameters>method body






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






43. Count++; count--






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






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






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






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






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






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






50. 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: