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 the next input token as a character string.






2. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type






3. The Scanner class is part of ___________________






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






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. Constructor: creates a new pseudorandom number generator.






7. ______________ operators have higher precedence






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






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






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






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






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






13. A ________________ is immutable.






14. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.






15. Elements of input






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






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






18. Attempts to find the next occurence of the specified pattern - ignoring delimiters






19. Variables that don't contain any data






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






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






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






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






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






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






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






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






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






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






30. The classes of the Java standard class library are grouped into __________.






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






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






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






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






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






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






37. New memory space is reserved for that variable every time an instance of the class that is created.






38. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)






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






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






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






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






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






44. The one that is invoked






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






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






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






48. When a variable is declared inside a method






49. Boolean type conversions are ___________






50. Expressed in a Java program with single quotes