Review Of Variables, Arguments, and Returns

From Huben's Wiki
Jump to: navigation, search

Have written answers to each of these questions. Demonstrate that you can, with an example, rather than saying "yes I can".

Can you:

  1. Name (if I give you an example) and explain all the bold terms in all the lessons?
  2. Spot the difference between a variable definition and a method signature?
  3. Name the 4 most important basic types for variables?
  4. Say what other type we use frequently?
  5. If that other type is not a basic type, what is it?
  6. Say what kind of capitalization we use for variables?
  7. Say what the number 5 is when we initialize an integer, or what "honk" is when we initialize a String?
  8. Say what the possible values of a boolean are?
  9. Identify the three kinds of variables in a program: fields, arguments, and local? Where are they?
  10. Say which kinds of variables are limited to a single method?
  11. Say what the word is for this limitation?
  12. Tell me what Math is when I say Math.sin(0) ?
  13. Tell me the result of '20 % 7' ?
  14. Tell me if Java uses PEMDAS?
  15. Spot an array type? What does it have?
  16. Create an array variable and initialize it to several values?
  17. Tell me the index (number) of the very first element in an array?
  18. Print a value out of an array if I tell you the index?
  19. Tell me which class you must run if you are working with more than one class?
  20. Say what the reserved word 'return' does?
  21. Identify other reserved words that we have covered?
  22. Explain the scopes of fields, arguments, and local variables?
  23. Write literals for int, double, and String?
  24. Tell me the two parts of a variable declaration?
  25. Identify in a method declaration the:
    1. return type
    2. name
    3. argument types and names
  26. Explain the problem: if I have a method public static int a(int b) why can't I call it with a(6.3)?
  27. Write a simple method that has a double array for an argument. The method should return the product of the first two elements of the array. Remember to include the return type!
  28. Create an array of doubles in a main with at least two elements that you pick at random.
  29. Call your simple method in main with your array, and print the result.
  30. Remember all the things from the previous Review Of Demonology Beginnings?
Personal tools
translate