Search:

Type: Posts; User: filipasa

Search: Search took 0.15 seconds.

  1. Reading text file character by character into a 2d char[][] array

    public static void main(String[] args)throws IOException
    {



    File inFile = new File("grid.txt");
    Scanner scanner = new Scanner(inFile);
    ...
  2. Re: ClassCastException: Vehicle cannot be cast to java.base/java.lang.Comparable

    Is this correct?



    package HRT;

    import java.util.TreeSet;

    public class Vehicle implements Comparable {
    String type ;
  3. ClassCastException: Vehicle cannot be cast to java.base/java.lang.Comparable

    package HRT;

    import java.util.TreeSet;

    public class Vehicle {
    String type ;
    double speed;


    public Vehicle() {
Results 1 to 3 of 3