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. Count++; count--






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






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






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






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






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






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






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






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






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






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






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






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






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






15. Elements of input






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






17. Before you use a variable __________it






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






19. Constructor: creates a new pseudorandom number generator.






20. Delimited by double quotation characters






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






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






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






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






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






26. Returns the character at the specified index.






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






28. All wrapper classes are defined in ___________






29. The Scanner class is part of ___________________






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






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






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






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






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






35. A name for a location in memory used to hold a data value.






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






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






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






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






40. Returns all input remaining on the current line as a character string.






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






42. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.






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






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






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






46. Returns the number of characters in this stirng.






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






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. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.






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