O GoConqr está de visual novo! Conte para nós o que você achou.

Mapa mental

methods and parameters of type object

daniela rodriguez Espanhol

Conteúdo do mapa

methods and parameters of type object

  1. Passing Information to a Method or a Constructor

    • The declaration for a method or a constructor declares the number and the type of the arguments for that method or constructor
  2. Parameters refers to the list of variables in a method declaration.

    • Arguments are the actual values that are passed in when the method is invoked.
      • You use varargs when you don't know how many of a particular type of argument will be passed to the method.
    • This includes primitive data types, such as doubles, floats, and integers, as you saw in the computePayment method, and reference data types, such as objects and arrays.
  3. When you declare a parameter to a method or a constructor, you provide a name for that parameter. This name is used within the method body to refer to the passed-in argument.

    • Many developers use the terms "type parameter" and "type argument" interchangeably, but these terms are not the same.
      • When coding, one provides type arguments in order to create a parameterized type.
  4. A parameter can have the same name as one of the class's fields

  5. public class Circle { private int x, y, radius; public void setOrigin(int x, int y) {

  6. public static void main(String[] args) { int x = 3; // invoke passMethod() with // x as argument passMethod(x); // print x to see if its // value has changed System.out.println("After invoking passMethod, x = " + x);

  7. By convention, type parameter names are single, uppercase letters.

    • Without this convention, it would be difficult to tell the difference between a type variable and an ordinary class or interface name.

Informações

Descrição
Mapa Mental sobre methods and parameters of type object, criado por daniela rodriguez em 17-05-2019.
Visualizações
0
Histórico
  • Criado por daniela rodriguez · 15 mai 2019
  • Copiado por daniela rodriguez · 17 mai 2019
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?