Search code examples
javaruntime-errormicrosoft-distributed-file-system

DFS implementation error?


I am using dfs algorithm to implement from geeksforgeeks.org link here

but when ever i have tried to run on compiler it is giving this error

Note: p1_dfs.java uses unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

YES I HAVE SEARCHED FOR IT ! AND GET SOLUTION HERE link here

BUT its not working I have changed generic type of list but not getting correct.

// Constructor
Graph(int v)
{
    V = v;
    adj = new LinkedList<Integer>[v];
    for (int i=0; i<v; ++i)
        adj[i] = new LinkedList<Integer>();
}

Solution

  • Its an error(not actually) generate by compier. So. Leave it and Run Program. :)