GoConqr has a new look! Let us know what you think.

Flashcards

Chapter 4 - 2

Everton Gonçalves Java OCA Portuguese 4 cards

Cards in this deck (4)

  1. 1An identifier may only containLetters, numbers, $ , or _ .
    Also, the first character is not allowed to be a number, and reserved words are not allowed.
    By convention, methods begin with a lowercase letter but are not required to
  2. 2Method signature: ExceptionYou can list as many types of exceptions as you want in this clause sepa-
    rated by commas
  3. 3A vararg parameterIt must be the last element in a method’s parameter list. This implies you are only allowed to have one vararg parameter per method. You can pass in an
    array, or you can list the elements of the array and let Java create it for you. You can even
    omit the vararg values in the method call and Java will create an array of length zero for
    you.
  4. 4Vararg: empty parameterJava will create an empty array if no parameters are passed for a
    vararg. However, it is still possible to pass null explicitly:
    walk(int i, int... nums);
    walk(1);
    walk(1, 1);
    walk(1, null); // throws a NullPointerException

Information

Description
OCA Java Flashcards on Chapter 4 - 2, created by Everton Gonçalves on 23/11/2018.
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?