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. The one that is invoked






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






3. When a variable is declared inside a method






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






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






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






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






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






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






10. Begins with a backslash character ""






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






12. Changes a particular value - e.g.setX - where X is the value they are setting.






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






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






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






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






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






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






19. Returns the number of characters in this stirng.






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






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






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






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






24. This declaration creates a Scanner object that reads input from the keyboard






25. Sets the scanner's delimiting pattern.






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






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






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






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






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






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






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






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






34. sides=10;






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






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






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






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






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






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






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






42. The Scanner class is part of ___________________






43. We use an object when we have a _________ to it






44. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.






45. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.






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






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






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






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






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