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






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






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






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






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






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






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






8. The values it stores internally - which may be represented as primitive data or as other objects. for example - a bank account object can store a floating point number (a primitive value) that represents the balance of the account. it can also contai






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






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






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






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






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






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






15. A class usually provides services to access and modify __________






16. Boolean type conversions are ___________






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






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






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






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






21. The act of creating an object using the "new" operator






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






23. Returns the number of characters in this stirng.






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






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






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






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






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






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






30. Expressed in a Java program with single quotes






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






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






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






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






35. When a variable is declared inside a method






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






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






38. A method that returns a value must have a _________






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






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






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






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






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






44. Count++; count--






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






46. Elements of input






47. An explicit data value used in a program






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






49. Represents either a primitive value or an object






50. _____ expression evaluated first