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 combo of one or more operators and operands that usually perform a calculation; operands can be literals - constants - variables - or other sources of data






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






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






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






5. Elements of input






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






7. The Scanner class is part of ___________________






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






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






10. sides=10;






11. When a variable is declared inside a method






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






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






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






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






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






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






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






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






20. Returns the character at the specified index.






21. A ________________ is immutable.






22. Variables that don't contain any data






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






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






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






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






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






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






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






30. The declarations of object variables have a similar structure to the declaration of _______________






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






32. Begins with a backslash character ""






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






34. Count++; count--






35. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.






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






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






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






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






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






41. All wrapper classes are defined in ___________






42. Expressed in a Java program with single quotes






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






44. Before you use a variable __________it






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






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. A name for a location in memory used to hold a data value.






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






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






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