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 a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.






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






3. Elements of input






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






5. Count++; count--






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






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






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






9. The one that is invoked






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






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






12. Boolean type conversions are ___________






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






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






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






16. Instance data should be defined with what________ visibility






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






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






19. _____ expression evaluated first






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






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






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






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






24. The Scanner class is part of ___________________






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






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






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






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






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






30. Represents either a primitive value or an object






31. A ________________ is immutable.






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






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






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






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






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






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






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






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. sides=10;






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






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






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






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






45. Returns the number of characters in this stirng.






46. Since an object ref var holds the address of the object - it can be thought of as a ____ to the location in memory where the object is held






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






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






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