ComenzarEmpieza gratis

Pointing to your first note

You're building a simple note-taking app. Each note will be stored in a file, so the first step is to create a File object that points to where your note will be saved. In this task, you'll prepare to manage a file called "note.txt".

Este ejercicio forma parte del curso

Input/Output and Streams in Java

Ver curso

Instrucciones del ejercicio

  • Import the File class from java.io.
  • Create a File object named noteFile that points to "note.txt".

Ejercicio interactivo práctico

Prueba este ejercicio y completa el código de muestra.

// Import File class 
import ____.____.____;

class NoteApp {

    public static void main(String[] args) {
		// Create a new File object that points to "note.txt"
        File noteFile = ____ ____("note.txt");
        System.out.println("Note file ready!");
	}
}
Editar y ejecutar código