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






2. The Scanner class is part of ___________________






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






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






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






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






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






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






9. sides=10;






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






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






12. Instance data should be defined with what________ visibility






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






14. Expressed in a Java program with single quotes






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






16. Constructor: creates a new pseudorandom number generator.






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






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






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






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






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






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






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






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






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






26. Elements of input






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






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






29. ______________ operators have higher precedence






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






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






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






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






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






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






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






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






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






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






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






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






42. Begins with a backslash character ""






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






44. They clarify the role a certain number has in the program.






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






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






47. A group of programming statements that is given a name. when a method is invoked - its statements are executed. a set of methods is associated with an object and defines its potential behaviors. to define the ability to make a deposit into a bank acc






48. Part of the standard Java class library - provides convenient methods for reading input values of various types. the input can come from various sources - including data typed interactively by the user or data stored in a file; the Scanner class can






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






50. Sets the scanner's delimiting pattern.