Advertisement
Guest User

Untitled

a guest
Nov 24th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.07 KB | None | 0 0
  1. What are the four rules for choosing variable identifiers? Can't use any reserved words, start with a digit, contains symbols/spaces and should start with a lowercase letter.
  2.  
  3. What is an algorithm? A set of instructions to perform a task.
  4.  
  5. What is an assembler? An assembler converts code to Assembly.
  6.  
  7. What is casting? Moving one primitive data type to another.
  8.  
  9. What is parsing? Moving one non-primitive data type to another.
  10.  
  11. What is the difference between pre and post operators for shortcut assignment operators? When the evaluation happens relative to the in/decrement.
  12.  
  13. Which of the following are valid shortcut assignment operators? +=
  14.  
  15. What's the first index in an array? 0
  16.  
  17. What is the syntax for a conditional (or "ternary") operator? boolean expression ? value_if_true : value_if_false
  18.  
  19. Why does == not work on objects? It checks the memory addresses that reference them as opposed to the values within them.
  20.  
  21. Is a switch statement required to have a default case? no
  22.  
  23. When would a switch statement be preferable over an if-nest? When the cases are decimals, enums, literals, constants, or Strings.
  24.  
  25. What is the only post-test loop accessible within Java? do-while
  26.  
  27. What is a sentinel value? A special value used to terminate a loop.
  28.  
  29. Why should you avoid absolute file pathing? foreign directory structure
  30.  
  31. What is a delimiter? A delimiter is a sequence of character(s) used to specify when one data item ends.
  32.  
  33. What is the default delimiter in Java? whitespace
  34.  
  35. What is a token? A token is a section of what is read until the next delimiter.
  36.  
  37. What is a method header? All of the method's modifiers, return type, identifier and parameter list.
  38.  
  39. What is the difference between a parameter and an argument? An argument is the data passed into parameters. A parameter is the variable in the function declaration.
  40.  
  41. What is a method's signature? A signature is a method's name and its parameter list.
  42.  
  43. How many returns are allowed per method, as per the Java style guide? 1
  44.  
  45. Are all objects immutable? No. Some objects can have their fields changed after construction.
  46.  
  47. What's the difference between passing a primitive value to a parameter and passing an object type to a parameter? Primitive will pass a value. Objects will pass a reference to its memory address.
  48.  
  49. What is method overloading? When a method has multiple unique signatures.
  50.  
  51. What is the concept of method decomposition? The process of taking a program and breaking it down into smaller, manageable units. Each of these smaller units will be performed by a method.
  52.  
  53. What is the concept of method cohesion? The method is concise and self-contained. The method should only do one thing. It should be able to function on its own.
  54.  
  55. Should a method be dependent on external variables? No. Minimal coupling should be strived for.
  56.  
  57. What is Object-Oriented Programming? OOP is a programming paradigm based on the concept of objects that consist of data fields and procedures.
  58.  
  59. What are the four principles of OOP? Encapsulation, Abstraction, Inheritance and Polymorphism.
  60.  
  61. What is an object? An object is an instance of a class.
  62.  
  63. What is an object's attribute? An instance variable, or field, is a data that makes up an object.
  64.  
  65. What is an object's state? The value of an object's attribute.
  66.  
  67. What is an object's behaviour? Actions the object can perform, represented by methods.
  68.  
  69. What is a constructor method? A constructor invokes the creation of a new object.
  70.  
  71. Can a class exist without declaring a constructor? Yes, the default constructor is automatically created at compile-time.
  72.  
  73. What are the three unique qualities of a constructor? They must have the same name as the class it's constructing. They do not return anything. They are invoked using the new operator.
  74.  
  75. What is the this qualifier? When a class needs to reference its own class instance.
  76.  
  77. What does instantiating an object do? Creates a memory address reference to itself.
  78.  
  79. What is encapsulation? Encapsulation is a principle used to prevent direct modification of class fields.
  80.  
  81. What is static? Static means that that specific instance is universal across all similar instances.
  82.  
  83. On a UML class diagram, what does an underline mean? static
  84.  
  85. On a UML class diagram, what do italics mean? abstract
  86.  
  87. When a method is called to be printed, what is the automatic method that is called? toString
  88.  
  89. What is an anonymous object? When an object does not have an explicit type.
  90.  
  91. What is method overriding? When a subclass method has specific instructions to overwrite its instance of the method of its superclass.
  92.  
  93. What is the difference between an API Developer and an Application Developer? API Devs develop classes, AppDevs create applications that use existing classes.
  94.  
  95. What is an enumeration? An enumeration is a data type consisting of named values with corresponding integer values.
  96.  
  97. What will an enumeration use as its default toString? Its constant name.
  98.  
  99. What are properties of utility classes? private constructor, attributes and methods are static
  100.  
  101. Are constants automatically static in utility classes? Yes. Constants are static since they are finalized.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement