我有一个名为elements.txt的文件保存到我的类和src中。我究竟做错了什么?
import java.util.Scanner;
import java.io.File;
import java.io.FileNotFoundException;
public class periodicTable
{
static Chemical_Elements[] el;
public static void main(String[] args) throws FileNotFoundException
{
File file = new File ("elements.txt");
Scanner scan = new Scanner (file);
System.out.println(file);