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. Widening byte: _________ - to int - to long - to float - to double






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






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






4. Expressed in a Java program with single quotes






5. ++count; -- count






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






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






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






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






10. Returns the character at the specified index.






11. Begins with a backslash character ""






12. An explicit data value used in a program






13. When a variable is declared inside a method






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






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






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






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






18. Methods in the Math class are ______






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






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






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






22. A class usually provides services to access and modify __________






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






24. Cast operator has _________ precedence to division






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






26. This declaration creates a Scanner object that reads input from the keyboard






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






28. Instance data should be defined with what________ visibility






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






30. A special method that has the same name as the class. After the "new" operator creates the object it is invoked to help set it up initially






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






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






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






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






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






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






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






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






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






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






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






42. Control access to the members of a class. the reserved words public and private are visibility modifiers that can be applied to the variables and methods of a class.






43. They clarify the role a certain number has in the program.






44. ______________ operators have higher precedence






45. Sets the scanner's delimiting pattern.






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






47. A ________________ is immutable.






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






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






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