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 true if this string contains the same characters as str (without regard to case) and false otherwise.






2. An explicit data value used in a program






3. Cast operator has _________ precedence to division






4. ++count; -- count






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






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






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






8. Sets the scanner's delimiting pattern.






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






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






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






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






13. sides=10;






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






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






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






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






18. Before you use a variable __________it






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






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






21. The Scanner class is part of ___________________






22. Begins with a backslash character ""






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






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






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






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






27. Elements of input






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






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






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






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






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






33. Every object has two things: a state and a _____ of behaviors






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






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






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






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






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






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






40. ______________ operators have higher precedence






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






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






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






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






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






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






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






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






49. Methods in the Math class are ______






50. When two variables contain the same address and therefore refer to the same object; one important implication of _________ is that when we use one ref to change an object - it is also changed for the other reference because there is really only one o