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 should be self-governing - meaning that the instance data of an object should be modified only by that object.






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






3. Begins with a backslash character ""






4. When a variable is declared inside a method






5. Boolean type conversions are ___________






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






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






8. Methods in the Math class are ______






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






10. When two variables contain the same address and therefore refer to the same object; one important implication of _________ is that when we use one ref to change an object - it is also changed for the other reference because there is really only one o






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






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






13. The one that is invoked






14. The Scanner class is part of ___________________






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






16. Expressed in a Java program with single quotes






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. Returns the next input token as the indicated type.






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






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






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






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






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






24. Each piece of data that we send to a method






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






26. Constructor: creates a new pseudorandom number generator.






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






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






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






30. All wrapper classes are defined in ___________






31. ++count; -- count






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






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. This declaration creates a Scanner object that reads input from the keyboard






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






36. Sets the scanner's delimiting pattern.






37. An explicit data value used in a program






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. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.






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






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






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






43. format for constants: all upper-case; separated by ________






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






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






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






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






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






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






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