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. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.






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






3. Variables that don't contain any data






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






5. All wrapper classes are defined in ___________






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






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






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






9. Represents either a primitive value or an object






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






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






12. Elements of input






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






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






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






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






17. Two floating data types: float - _______






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






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






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






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






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






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






24. Sets the scanner's delimiting pattern.






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






26. Boolean type conversions are ___________






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






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






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






30. The values it stores internally - which may be represented as primitive data or as other objects. for example - a bank account object can store a floating point number (a primitive value) that represents the balance of the account. it can also contai






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






32. A set of classes that supports the development of programs






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






34. Cast operator has _________ precedence to division






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






36. Methods in the Math class are ______






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






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






39. Count++; count--






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






41. Instance data should be defined with what________ visibility






42. Delimited by double quotation characters






43. _____ expression evaluated first






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






45. ______________ operators have higher precedence






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






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






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






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






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