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. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.






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






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






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






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






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






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






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






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






10. Methods in the Math class are ______






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






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






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






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






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






16. Boolean type conversions are ___________






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






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






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






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






21. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.






22. Instance data should be defined with what________ visibility






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






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






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






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






27. A Java operator that is specified by a type name in parentheses; truncates rather than rounds; useful in division if u want an integer to be treated as a float or double






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






29. _____ expression evaluated first






30. ______________ operators have higher precedence






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






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






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






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






35. Before you use a variable __________it






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






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






38. ++count; -- count






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






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






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






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






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






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






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






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






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






48. The Scanner class is part of ___________________






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






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