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. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.






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






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






4. declaration that creates a String variable that holds a reference to a String object; an object variable doesn't hold an object itself - it holds the address of an object






5. Every object has two things: a state and a _____ of behaviors






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






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






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






9. All numeric types are _______ - meaning both positive and negative values can be stored in them






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






11. Constructor: creates a new pseudorandom number generator.






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






13. sides=10;






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






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






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






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






18. Instance data should be defined with what________ visibility






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






20. Returns the number of characters in this stirng.






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






22. The automatic conversion between a primitive value and a corresponding wrapper object.






23. The one that is invoked






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






25. Two floating data types: float - _______






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






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






28. When a variable is declared inside a method






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






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






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






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






33. ++count; -- count






34. All wrapper classes are defined in ___________






35. Returns true if the scanner has anotehr token in its input.






36. The values passed into a method in an invocation; these are called the arguments to the method






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






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






39. Methods in the Math class are ______






40. Represents either a primitive value or an object






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






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






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






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






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






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






47. Only two valid values: true and false; can indicate whether a particular condition is true - but can also be used to represent any situation that has two states - such as a light bulb being on or off






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






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






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