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. Returns the next input token as the indicated type.






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






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






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






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






6. Expressed in a Java program with single quotes






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






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






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






10. Cast operator has _________ precedence to division






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






12. Returns the character at the specified index.






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






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






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






16. Begins with a backslash character ""






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






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






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






20. Two floating data types: float - _______






21. Represents either a primitive value or an object






22. A ________________ is immutable.






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






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






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






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






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






28. All wrapper classes are defined in ___________






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






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






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






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






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. An object in Java - defined by the class String






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






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






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






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






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






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






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






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






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






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






45. Variables that don't contain any data






46. Delimited by double quotation characters






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






48. The Scanner class is part of ___________________






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






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