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. The Scanner class is part of ___________________






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






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






4. Delimited by double quotation characters






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






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






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






8. format for constants: all upper-case; separated by ________






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






10. Cast operator has _________ precedence to division






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






12. Count++; count--






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






14. Returns the character at the specified index.






15. Returns the number of characters in this stirng.






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






17. Two floating data types: float - _______






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






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






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






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






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






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






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






25. Begins with a backslash character ""






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






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






28. A ________________ is immutable.






29. Expressed in a Java program with single quotes






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






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






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






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






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






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






36. The values passed into a method in an invocation; these are called the arguments to the method






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






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






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






40. Represents either a primitive value or an object






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






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






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






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






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






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






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






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






49. Instance data should be defined with what________ visibility






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