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. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.






3. Occurs automatically when certain operators need to modify their opeands in order to perform the operation






4. Variables and constants can be referenced in any method of the class by declaring at the _________






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






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






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






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






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






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






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






12. Returns the character at the specified index.






13. The one that is invoked






14. Provide various methods related to the management of the associated primitive type. Used when we create an object that serves as a container to hold various types of other objects - and we want the object to hold a simple integer value. In this case






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






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






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






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






19. Cast operator has _________ precedence to division






20. All wrapper classes are defined in ___________






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






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






23. Instance data should be defined with what________ visibility






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






25. ++count; -- count






26. Variables that don't contain any data






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






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






29. A variable that refers to an object must be __________






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






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






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






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






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






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






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






37. Begins with a backslash character ""






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






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






40. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar






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






42. Methods in the Math class are ______






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






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






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






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






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






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






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






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