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






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






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






4. ______________ operators have higher precedence






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






6. Cast operator has _________ precedence to division






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






8. Before you use a variable __________it






9. Instance data should be defined with what________ visibility






10. Sets the scanner's delimiting pattern.






11. An object has behaviors - which are defined by the ________ associated with that object.






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






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






14. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)






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






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






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






18. Five steps of problem-solving: ____________ the problem - Designing a solution - Considering alternatives to the solution and refining the solution - Implementing the solution - Testing the solution and fixing any problems that exist






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






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






21. Delimited by double quotation characters






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






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






24. Defined and then used as the type of a variable when it is declared; establishes all possible values of a variable of that type by listing - or enumerating - them.






25. Returns the character at the specified index.






26. Represents either a primitive value or an object






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






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






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






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






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






32. Expressed in a Java program with single quotes






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






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






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






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






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






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






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






40. The one that is invoked






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






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






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






44. Methods in the Math class are ______






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






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






47. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.






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






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






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