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. All numeric types are _______ - meaning both positive and negative values can be stored in them






2. Part of the java.util class; picks a number at random out of a range of values.






3. Expressed in a Java program with single quotes






4. Instance data should be defined with what________ visibility






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






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






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






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






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






10. Three ways in which Java conversions occur: _________ conversion - promotion - casting






11. Boolean type conversions are ___________






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






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






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






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






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






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






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






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






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






21. Since an object ref var holds the address of the object - it can be thought of as a ____ to the location in memory where the object is held






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






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






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






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






26. Two floating data types: float - _______






27. Cast operator has _________ precedence to division






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. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.






30. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)






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






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






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






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






35. Returns the character at the specified index.






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






37. The one that is invoked






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






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






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






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






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






43. Represents either a primitive value or an object






44. The idea that we can refer to multiple types of related objects over time in consistent ways. it gives us the ability to design powerful and elegant solutions to problems that deal with multiple objects.






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






46. A ____________ and definition always give the parameter list in parentheses after the method name. if there are no parameters - an empty set of parentheses is used






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






48. Sets the scanner's delimiting pattern.






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






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