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. format for constants: all upper-case; separated by ________






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






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






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






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






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






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






8. Begins with a backslash character ""






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






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






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






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






13. Elements of input






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






15. Two floating data types: float - _______






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






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






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






19. Constructor: creates a new pseudorandom number generator.






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






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






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






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






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






25. Expressed in a Java program with single quotes






26. All wrapper classes are defined in ___________






27. Before you use a variable __________it






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






29. Returns the character at the specified index.






30. sides=10;






31. Also called a selection statement b/c it allows us to choose which statement will be executed next.






32. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.






33. Returns the number of characters in this stirng.






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






35. Sets the scanner's delimiting pattern.






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






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






38. A ________________ is immutable.






39. The names of the parameters in the header of the method declaration






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






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






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






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






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






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






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






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






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






50. When a variable is declared inside a method