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. Begins with a backslash character ""






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






3. Represents either a primitive value or an object






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






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






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






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






8. Before you use a variable __________it






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






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. Returns true if the scanner has anotehr token in its input.






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






13. Two categories of statements that control the flow of executing through a method: __________ and loops






14. sides=10;






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






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






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






18. How classes are created from other classes. the definition of one class can be based on another class that already exists. inheritance is a form of software reuse - capitalizing on the similarities between various kinds of classes that we want to cre






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






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






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






22. When a variable is declared inside a method






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






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






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






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






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






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






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






30. Returns the character at the specified index.






31. A method that returns a value must have a _________






32. Methods in the Math class are ______






33. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.






34. Cast operator has _________ precedence to division






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






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






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






38. Sets the scanner's delimiting pattern.






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






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






41. Boolean type conversions are ___________






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






43. Constructor: creates a new pseudorandom number generator.






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






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. Only two valid values: true and false; can indicate whether a particular condition is true - but can also be used to represent any situation that has two states - such as a light bulb being on or off






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






48. ++count; -- count






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






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