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 identical to this string except all uppercase letters are converted to their lowercase equivalent.






2. An explicit data value used in a program






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






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






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






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






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






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






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






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






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






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






13. Count++; count--






14. An object has behaviors - which are defined by the ________ associated with that object.






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






16. Boolean type conversions are ___________






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






18. The one that is invoked






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






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






21. _____ expression evaluated first






22. When a variable is declared inside a method






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






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






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






26. Elements of input






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






28. Delimited by double quotation characters






29. The Scanner class is part of ___________________






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






31. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.






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






33. The declarations of object variables have a similar structure to the declaration of _______________






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






35. Begins with a backslash character ""






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






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






38. A ________________ is immutable.






39. Instance data should be defined with what________ visibility






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






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






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






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






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






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






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






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






48. This declaration creates a Scanner object that reads input from the keyboard






49. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.






50. Returns the number of characters in this stirng.