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. We use an object when we have a _________ to it






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






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






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






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






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






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






8. Represents either a primitive value or an object






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






10. In the header of a method specifies he types of the values that are passed and the names by which the called method will refer to those values.






11. An explicit data value used in a program






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






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






14. The Scanner class is part of ___________________






15. Sets the scanner's delimiting pattern.






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






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






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






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






20. Begins with a backslash character ""






21. Instance data should be defined with what________ visibility






22. A Java operator that is specified by a type name in parentheses; truncates rather than rounds; useful in division if u want an integer to be treated as a float or double






23. sides=10;






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






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






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






27. A ________________ is immutable.






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






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






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






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






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






33. All numeric types are _______ - meaning both positive and negative values can be stored in them






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






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






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






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






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






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






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






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






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






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. Returns true if the scanner has anotehr token in its input.






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






46. The location at which a variable is declared defines its scope - which is the area within a program in which the variable can be referenced.






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






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






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






50. Variables and constants can be referenced in any method of the class by declaring at the _________