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






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






3. Delimited by double quotation characters






4. The one that is invoked






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






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






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






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






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






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






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






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






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






14. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.






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






16. A ________________ is immutable.






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






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






19. Returns the character at the specified index.






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






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






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






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






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






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






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






27. A combo of one or more operators and operands that usually perform a calculation; operands can be literals - constants - variables - or other sources of data






28. ______________ operators have higher precedence






29. Represents either a primitive value or an object






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






31. Instance data should be defined with what________ visibility






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






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






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






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. Sets the scanner's delimiting pattern.






37. Constructor: creates a new pseudorandom number generator.






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






39. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;






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






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






42. Variables that don't contain any data






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






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






45. All wrapper classes are defined in ___________






46. Begins with a backslash character ""






47. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.






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






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






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