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. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.






2. Occurs when a value of one type is assigned to a variable of another type during which the value is converted to the new type.






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






4. Elements of input






5. When a variable is declared inside a method






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






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






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






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






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






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






12. Represents either a primitive value or an object






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






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






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






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






17. sides=10;






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






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






20. Two floating data types: float - _______






21. Count++; count--






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






23. Constructor: creates a new pseudorandom number generator.






24. ++count; -- count






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






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






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






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






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






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






31. Begins with a backslash character ""






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






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






34. Returns the character at the specified index.






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






36. Part of the java.util class; picks a number at random out of a range of values.






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






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






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






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






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






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






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






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






45. An explicit data value used in a program






46. Variables that don't contain any data






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






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






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






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