ComeçarComece de graça

Assign and print

After declaring variables, you assign values using the = operator. Once assigned, you can print the values using System.out.println().

Give it a go!

Este exercício faz parte do curso

Introduction to Java

Ver curso

Instruções do exercício

  • Create a String variable creator and assign "James Gosling" to it.
  • Print the creator variable.

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

class InfoAboutJava {
	public static void main(String[] args) {
    	
        String language = "Java";
        int yearOfOrigin = 1995;
        
        // Create and assign the creator variable
        String ____ ____ ____;
        
        System.out.println(language);
        System.out.println(yearOfOrigin);
        // Print the creator of Java
        System.out.println(____);
    }
}
Editar e executar o código