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






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






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






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






5. Before you use a variable __________it






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






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






8. The blueprint of an object. establishes the kind of data an object of that type will hold and defines the methods that represent the behavior of such objects. however - a class contains no space to store data. each object has space for its own data -






9. Attempts to find the next occurence of the specified pattern - ignoring delimiters






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






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






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






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






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






15. The one that is invoked






16. The Scanner class is part of ___________________






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






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






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






20. Two floating data types: float - _______






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






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






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






24. When a variable is declared inside a method






25. Part of the standard Java class library - provides convenient methods for reading input values of various types. the input can come from various sources - including data typed interactively by the user or data stored in a file; the Scanner class can






26. An explicit data value used in a program






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






28. Begins with a backslash character ""






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






30. Cast operator has _________ precedence to division






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






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






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






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






35. Constructor: creates a new pseudorandom number generator.






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






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






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






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






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






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






42. Methods in the Math class are ______






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






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






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






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






47. ++count; -- count






48. Count++; count--






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






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