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 ejercicio forma parte del curso
Introduction to Java
Instrucciones del ejercicio
- Create a
Stringvariablecreatorand assign"James Gosling"to it. - Print the
creatorvariable.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
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(____);
}
}