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. ____________ is instantiated in the traditional way using the new operator.






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






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






4. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)






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






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






7. Cast operator has _________ precedence to division






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






9. Represents either a primitive value or an object






10. Returns the number of characters in this stirng.






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






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






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






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






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






16. Begins with a backslash character ""






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






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






20. When a variable is declared inside a method






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






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






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






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






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






26. A ________________ is immutable.






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






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. Two floating data types: float - _______






30. All wrapper classes are defined in ___________






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






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






33. Expressed in a Java program with single quotes






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






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






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






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






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






39. ++count; -- count






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






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






42. Count++; count--






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






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






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






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






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






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






49. The Scanner class is part of ___________________






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