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. The act of creating an object using the "new" operator






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






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






4. Returns the character at the specified index.






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






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






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






8. ______________ operators have higher precedence






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






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






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






12. sides=10;






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






14. The Scanner class is part of ___________________






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






16. The one that is invoked






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






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






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






20. Before you use a variable __________it






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






36. Sets the scanner's delimiting pattern.






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






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






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






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






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






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






43. Returns the number of characters in this stirng.






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






45. Elements of input






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






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






48. Occurs when a value of one type is assigned to a variable of another type during which the value is converted to the new type.






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






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