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. New memory space is reserved for that variable every time an instance of the class that is created.






2. Represents either a primitive value or an object






3. Two floating data types: float - _______






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






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






6. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.






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






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






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






10. Returns the character at the specified index.






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






12. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.






13. Boolean type conversions are ___________






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






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






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






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






18. When a variable is declared inside a method






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






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






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






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






23. The one that is invoked






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






25. How classes are created from other classes. the definition of one class can be based on another class that already exists. inheritance is a form of software reuse - capitalizing on the similarities between various kinds of classes that we want to cre






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






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






28. All wrapper classes are defined in ___________






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






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






31. Methods in the Math class are ______






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






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






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






35. Sets the scanner's delimiting pattern.






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






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






38. sides=10;






39. Expressed in a Java program with single quotes






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






41. Returns the next input token as a character string.






42. Returns the number of characters in this stirng.






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






44. Before you use a variable __________it






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






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






47. ______________ operators have higher precedence






48. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.






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






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