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. An object has behaviors - which are defined by the ________ associated with that object.






2. ++count; -- count






3. A ________________ is immutable.






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






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






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






7. _____ expression evaluated first






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






9. Occurs automatically when certain operators need to modify their opeands in order to perform the operation






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






11. Elements of input






12. Expressed in a Java program with single quotes






13. Cast operator has _________ precedence to division






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






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






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






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






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






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






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






21. Instance data should be defined with what________ visibility






22. Boolean type conversions are ___________






23. Represents either a primitive value or an object






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






25. Two floating data types: float - _______






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






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






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






29. The Scanner class is part of ___________________






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






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






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






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






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






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






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






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






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






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






40. All wrapper classes are defined in ___________






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






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






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






44. Delimited by double quotation characters






45. Returns the number of characters in this stirng.






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






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






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






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






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