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. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)






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






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






4. Occurs automatically when certain operators need to modify their opeands in order to perform the operation






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






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






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






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






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






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






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






12. Four integer data types: byte - short - int - _____






13. Returns the character at the specified index.






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






15. sides=10;






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






17. Sets the scanner's delimiting pattern.






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






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






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






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






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






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






24. Expressed in a Java program with single quotes






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






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






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






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






29. Methods in the Math class are ______






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






31. Returns the number of characters in this stirng.






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






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






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






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






36. Begins with a backslash character ""






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






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






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






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






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






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






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






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






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






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






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






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






49. When a variable is declared inside a method






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