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. Variables and constants can be referenced in any method of the class by declaring at the _________






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






3. _____ expression evaluated first






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






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






6. Elements of input






7. Returns the number of characters in this stirng.






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






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






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






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






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






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






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






15. Begins with a backslash character ""






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






17. Represents either a primitive value or an object






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






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






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






21. Variables that don't contain any data






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






23. A ________________ is immutable.






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






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






26. Every object has two things: a state and a _____ of behaviors






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






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






29. A name for a location in memory used to hold a data value.






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






31. Constructor: creates a new pseudorandom number generator.






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






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






34. Expressed in a Java program with single quotes






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






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






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






38. ______________ operators have higher precedence






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






40. Boolean type conversions are ___________






41. How classes are created from other classes. the definition of one class can be based on another class that already exists. inheritance is a form of software reuse - capitalizing on the similarities between various kinds of classes that we want to cre






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






43. Also called a selection statement b/c it allows us to choose which statement will be executed next.






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






45. When a variable is declared inside a method






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






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






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






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






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