import java.io.*;
import java.util.*;
public class SortF {
public static void main(String[] args) {
try {
BufferedReader in = new BufferedReader(
new FileReader("FFile.txt"));
String s2 = new String();
s2 = in.toString();
in.close();
String[] F = s2.split(" ");
System.out.println();
for(int x = 0; x < F.length; x++)
System.out.println(F[x]);
System.out.println();
Arrays.sort(F);
for(int x = 0; x < F.length; x++)
System.out.println(F[x]);
System.out.println();
} catch (IOException ioe) {
}
}
}
----------------------------------------------------------------------------
and these are my errors:
in NetBeans:
java.lang.NoClassDefFoundError: practice/SortF (wrong name: SortF)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
Exception in thread "main"
and in DOS I get:
java.io.BufferReader@1ddebc3
java.io.BufferReader@1ddebc3
What the ??????????????????????????????????????????????????????????????????
import java.util.*;
public class SortF {
public static void main(String[] args) {
try {
BufferedReader in = new BufferedReader(
new FileReader("FFile.txt"));
String s2 = new String();
s2 = in.toString();
in.close();
String[] F = s2.split(" ");
System.out.println();
for(int x = 0; x < F.length; x++)
System.out.println(F[x]);
System.out.println();
Arrays.sort(F);
for(int x = 0; x < F.length; x++)
System.out.println(F[x]);
System.out.println();
} catch (IOException ioe) {
}
}
}
----------------------------------------------------------------------------
and these are my errors:
in NetBeans:
java.lang.NoClassDefFoundError: practice/SortF (wrong name: SortF)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
Exception in thread "main"
and in DOS I get:
java.io.BufferReader@1ddebc3
java.io.BufferReader@1ddebc3
What the ??????????????????????????????????????????????????????????????????