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. Before you use a variable __________it






2. Returns the number of characters in this stirng.






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






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






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






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






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






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






9. Represents either a primitive value or an object






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






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






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






13. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.






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






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






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






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






18. All wrapper classes are defined in ___________






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






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






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






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






23. A set of classes that supports the development of programs






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






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






26. sides=10;






27. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight






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






29. ++count; -- count






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






31. Two floating data types: float - _______






32. Boolean type conversions are ___________






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






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






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






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






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






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. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)






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






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






42. A ________________ is immutable.






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






44. Expressed in a Java program with single quotes






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






46. When a variable is declared inside a method






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






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






49. ______________ operators have higher precedence






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