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. A class usually provides services to access and modify __________






2. Boolean type conversions are ___________






3. Expressed in a Java program with single quotes






4. All numeric types are _______ - meaning both positive and negative values can be stored in them






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






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






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






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






9. Delimited by double quotation characters






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






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






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






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






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






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






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






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






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






19. ______________ operators have higher precedence






20. Count++; count--






21. Returns all input remaining on the current line as a character string.






22. Instance data should be defined with what________ visibility






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






24. Protection and management of an object's info. this implies that the object should be self-governing. the only changes made to the state of the object should be accomplished by that object's methods. other objects should not be able to "reach in" to






25. A ________________ is immutable.






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






27. Begins with a backslash character ""






28. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.






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






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






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






32. An explicit data value used in a program






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






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






35. Methods in the Math class are ______






36. Variables that don't contain any data






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






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






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






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






41. Two floating data types: float - _______






42. The one that is invoked






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






44. If the string object str holds the string "987" - the following line of code converts the string into the integer variable 987 and stores that value in the int variable num:






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






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






47. ____________ is instantiated in the traditional way using the new operator.






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






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






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