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. Three ways in which Java conversions occur: _________ conversion - promotion - casting






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






3. Represents either a primitive value or an object






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






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






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






7. An explicit data value used in a program






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






9. All wrapper classes are defined in ___________






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






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






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






13. ______________ operators have higher precedence






14. Returns the number of characters in this stirng.






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






31. Methods in the Math class are ______






32. If the string object str holds the string "987" - the following line of code converts the string into the integer variable 987 and stores that value in the int variable num:






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






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






35. format for constants: all upper-case; separated by ________






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






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






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






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






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






41. Elements of input






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






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. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight






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






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






47. _____ expression evaluated first






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






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






50. The one that is invoked