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. An object in Java - defined by the class String






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






3. A value that is passed into a method when it is invoked






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






5. Methods in the Math class are ______






6. Two floating data types: float - _______






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






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






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






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






11. A ________________ is immutable.






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






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






14. Constants are ______ because the can't be changed once you use the final modifier






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






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






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






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






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






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






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






22. Represents either a primitive value or an object






23. Cast operator has _________ precedence to division






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






25. Declared in a class but not inside any particular method






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






27. Elements of input






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






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






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






31. Also called a selection statement b/c it allows us to choose which statement will be executed next.






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






33. Instance data should be defined with what________ visibility






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






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






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






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






38. The Scanner class is part of ___________________






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






40. Count++; count--






41. Variables that don't contain any data






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






43. ______________ operators have higher precedence






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






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






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






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






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






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






50. Returns the number of characters in this stirng.