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. Each piece of data that we send to a method






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






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






4. _____ expression evaluated first






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






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






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






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






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






10. Elements of input






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






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






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






14. Instance data should be defined with what________ visibility






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






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. Four integer data types: byte - short - int - _____






18. The Scanner class is part of ___________________






19. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.






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






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






22. Begins with a backslash character ""






23. Modifier>type/void>identifier>parameters>method body






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






25. The order in which statements are executed in a running program






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






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






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






29. The one that is invoked






30. Represents either a primitive value or an object






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






32. Boolean type conversions are ___________






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






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






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






36. A ________________ is immutable.






37. ______________ operators have higher precedence






38. Sets the scanner's delimiting pattern.






39. Methods in the Math class are ______






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






41. ++count; -- count






42. sides=10;






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






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






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






46. Returns the number of characters in this stirng.






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






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






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






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