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. Returns all input remaining on the current line as a character string.






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






3. Expressed in a Java program with single quotes






4. An explicit data value used in a program






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. Before you use a variable __________it






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






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






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






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. An object has behaviors - which are defined by the ________ associated with that object.






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






13. When a variable is declared inside a method






14. Two floating data types: float - _______






15. Begins with a backslash character ""






16. Elements of input






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






18. Returns the int corresponding to the value stored in the specified string






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






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






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






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






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






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. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.






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






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






28. _____ expression evaluated first






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






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






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






32. Instance data should be defined with what________ visibility






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






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






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






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






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






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






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






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






41. Boolean type conversions are ___________






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






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






44. When two variables contain the same address and therefore refer to the same object; one important implication of _________ is that when we use one ref to change an object - it is also changed for the other reference because there is really only one o






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






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






47. A ________________ is immutable.






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






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






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