ComeçarComece de graça

Assign and print

Once you've created variables, you can assign values to them and display those values. This is a fundamental pattern you'll use throughout your programming journey. In this exercise, two variables have already been created for you: language and yearOfOrigin.

Este exercício faz parte do curso

Introduction to Java

Ver curso

Instruções do exercício

  • Create a text variable called 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 text variable creator
        String ____ ____ ____;
        
        System.out.println(language);
        System.out.println(yearOfOrigin);
        // Print the creator of Java
        System.out.println(____);
    }
}
Editar e executar o código