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. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________






2. ______________ operators have higher precedence






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






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






5. sides=10;






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






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






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






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






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






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






12. Five steps of problem-solving: ____________ the problem - Designing a solution - Considering alternatives to the solution and refining the solution - Implementing the solution - Testing the solution and fixing any problems that exist






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






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






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






16. Two floating data types: float - _______






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






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






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






20. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.






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






22. Constants are ______ because the can't be changed once you use the final modifier






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






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






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






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






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






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






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






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






31. Returns the character at the specified index.






32. A variable that refers to an object must be __________






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






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






35. Methods in the Math class are ______






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






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






38. ++count; -- count






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






40. Protection and management of an object's info. this implies that the object should be self-governing. the only changes made to the state of the object should be accomplished by that object's methods. other objects should not be able to "reach in" to






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






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






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






44. _____ expression evaluated first






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






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






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






48. The order in which statements are executed in a running program






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






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