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. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.






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






3. Before you use a variable __________it






4. Returns the character at the specified index.






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






22. Two floating data types: float - _______






23. The Scanner class is part of ___________________






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






25. We use an object when we have a _________ to it






26. The one that is invoked






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






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






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






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






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






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






33. Methods in the Math class are ______






34. A ________________ is immutable.






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






36. Begins with a backslash character ""






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






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






39. All wrapper classes are defined in ___________






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






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






42. In the header of a method specifies he types of the values that are passed and the names by which the called method will refer to those values.






43. Variables and constants can be referenced in any method of the class by declaring at the _________






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






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






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






47. sides=10;






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






49. Part of the java.util class; picks a number at random out of a range of values.






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