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 character at the specified index.






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






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






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






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






6. Count++; count--






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






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






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






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






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






12. Begins with a backslash character ""






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






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






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






16. Delimited by double quotation characters






17. Occurs when a value of one type is assigned to a variable of another type during which the value is converted to the new type.






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






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






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






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






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






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






24. Constructor: creates a new pseudorandom number generator.






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






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






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






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






29. Returns the number of characters in this stirng.






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






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






32. Instance data should be defined with what________ visibility






33. Widening byte: _________ - to int - to long - to float - to double






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






35. Sets the scanner's delimiting pattern.






36. Expressed in a Java program with single quotes






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






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






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






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






41. An explicit data value used in a program






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






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






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






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






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






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






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






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






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