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. Occurs automatically when certain operators need to modify their opeands in order to perform the operation






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






3. ____________ is instantiated in the traditional way using the new operator.






4. Elements of input






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






6. Changes a particular value - e.g.setX - where X is the value they are setting.






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






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






9. The one that is invoked






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






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






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






13. An explicit data value used in a program






14. White space characters such as space characters - tabs - and new lines that separate the elements of input






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






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






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






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






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






20. sides=10;






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






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






23. Sets the scanner's delimiting pattern.






24. Two floating data types: float - _______






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






26. Begins with a backslash character ""






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






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






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






30. A group of programming statements that is given a name. when a method is invoked - its statements are executed. a set of methods is associated with an object and defines its potential behaviors. to define the ability to make a deposit into a bank acc






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






32. New memory space is reserved for that variable every time an instance of the class that is created.






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






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. Widening byte: _________ - to int - to long - to float - to double






36. How classes are created from other classes. the definition of one class can be based on another class that already exists. inheritance is a form of software reuse - capitalizing on the similarities between various kinds of classes that we want to cre






37. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.






38. Variables that don't contain any data






39. Cast operator has _________ precedence to division






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






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






42. Constructor: creates a new pseudorandom number generator.






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






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






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






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






47. Expressed in a Java program with single quotes






48. Represents either a primitive value or an object






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






50. We use an object when we have a _________ to it