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. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.






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






3. The one that is invoked






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






5. Begins with a backslash character ""






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






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






8. sides=10;






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






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






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






12. A ________________ is immutable.






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






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






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






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






17. _____ expression evaluated first






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






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






20. An object in Java - defined by the class String






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






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






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






24. Count++; count--






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






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






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






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






29. A class usually provides services to access and modify __________






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






31. Expressed in a Java program with single quotes






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






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






34. An explicit data value used in a program






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






36. This declaration creates a Scanner object that reads input from the keyboard






37. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.






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






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






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






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






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






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






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






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






46. Returns true if the scanner has anotehr token in its input.






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






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






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






50. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;