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






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






3. Begins with a backslash character ""






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






5. Expressed in a Java program with single quotes






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






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






8. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.






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






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






11. Cast operator has _________ precedence to division






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






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






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






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






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






17. Two floating data types: float - _______






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






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






20. All wrapper classes are defined in ___________






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






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






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






24. Sets the scanner's delimiting pattern.






25. Represents either a primitive value or an object






26. Return type specified in the method header can be a primitive type - class name or the ________; when a method does not return any value - void is used as the return type - as is always done with the main method.






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






28. The Scanner class is part of ___________________






29. A ________________ is immutable.






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






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






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






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






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






35. The automatic conversion between a primitive value and a corresponding wrapper object.






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






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






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






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






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






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






42. Boolean type conversions are ___________






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






44. ______________ operators have higher precedence






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






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






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






48. ++count; -- count






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






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