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 a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar






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






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






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






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






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






7. ++count; -- count






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






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






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






11. Three ways in which Java conversions occur: _________ conversion - promotion - casting






12. Constructor: creates a new pseudorandom number generator.






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






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






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






16. Delimited by double quotation characters






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






18. The one that is invoked






19. Sets the scanner's delimiting pattern.






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






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






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






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






24. All wrapper classes are defined in ___________






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






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






27. Represents either a primitive value or an object






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






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






30. When a variable is declared inside a method






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






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






33. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.






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






35. Methods in the Math class are ______






36. sides=10;






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






38. Returns the number of characters in this stirng.






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






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






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






42. Returns the next input token as a character string.






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






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






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






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






47. Instance data should be defined with what________ visibility






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






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






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






Can you answer 50 questions in 15 minutes?



Let me suggest you:



Major Subjects



Tests & Exams


AP
CLEP
DSST
GRE
SAT
GMAT

Most popular tests