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






2. Count++; count--






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






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






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






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






7. Represents either a primitive value or an object






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






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






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






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






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






13. The one that is invoked






14. A ________________ is immutable.






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






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






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






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






19. Instance data should be defined with what________ visibility






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






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






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






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






24. Expressed in a Java program with single quotes






25. A name for a location in memory used to hold a data value.






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






27. ++count; -- count






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






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






31. Sets the scanner's delimiting pattern.






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






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






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






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






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






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






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






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






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






41. Begins with a backslash character ""






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






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






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






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






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






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






48. In the header of a method specifies he types of the values that are passed and the names by which the called method will refer to those values.






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






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