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. Returns a string containing the specified number formatted according to this object's pattern.






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






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






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






6. Boolean type conversions are ___________






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






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






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






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






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






12. Count++; count--






13. If the string object str holds the string "987" - the following line of code converts the string into the integer variable 987 and stores that value in the int variable num:






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






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






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






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






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






19. The location at which a variable is declared defines its scope - which is the area within a program in which the variable can be referenced.






20. Instance data should be defined with what________ visibility






21. Three ways in which Java conversions occur: _________ conversion - promotion - casting






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






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






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






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






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






27. The act of creating an object using the "new" operator






28. Expressed in a Java program with single quotes






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






30. Returns the character at the specified index.






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






32. Two floating data types: float - _______






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






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






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






36. Variables that don't contain any data






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






38. Making it difficult - if not impossible - for code outside of a class to "reach in" and chnage the value of a variable that is declared inside that class.






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






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






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






42. Delimited by double quotation characters






43. Elements of input






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






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






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






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






48. Methods in the Math class are ______






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






50. Constructor: creates a new pseudorandom number generator.