Trip Advisor - Train routes Gives advice to the user on which trains to take to reach a destination      

 public class TripAdvisor {
        private Station source;
        private Station destination;
        private double cost;
        /**
         * 
         * @param path the shortest path returned by the shortestPath method implementation
         */
        TripAdvisor(ArrayList&lt;Station&gt; path)
        {
            Lane color=null;
            ArrayList&lt;Station&gt; changeStation =new ArrayList&lt;Station&gt;();//used to identify when the user needs to change lines
            ArrayList&lt;Object&gt; trains=new ArrayList&lt;&gt;();//list of trains the user need to take to reach a station
            for(int i=0;i&lt;(path.size()-1);i++)
            {

                Station current=path.get(i);
                Station next=path.get(i+1);
                for (Connection e : current.adjacencies)
                {
                    if(e.getTarget().equals(next))
                    {
                        Lane train=e.getLaneColor();
                        trains.add(train);
                        if(!e.getLaneColor().equals(color)&amp;&amp;(color!=null))
                        {
                            changeStation.add(current);
                        }
                    }
                    color=e.getLaneColor();
                }
            }

            System.out.println("trains"+ "$" +trains);
            if(trains.size()==1)
            {
                int q;
                System.out.println("Take a "+ trains.get(0) +"liner from" + path.get(0) +"to reach" + path.get( q=path.size()));
            }
            else
            {
                System.out.println("Take a "+ trains.get(0) +"liner from" + path.get(0)+ "Get down at" + changeStation.get(0));

            }
        }

    }
    /**
     * 
     * @author PrasannaAarthiB
     * This has all the lines in the metro.They are represented by different colors
     */
    public enum Lane{
        RED,BLUE,GREEN,YELLOW,BLACK
    }
First of all, you have a possible bug in your code.

If trains is empty you will get a problem at the printing of the results.


Don't code that much inside the constructor. The constructor should be used for initializing only.  
Be consitent in the way you create objects  


ArrayList&lt;Station&gt; changeStation =new ArrayList&lt;Station&gt;();
ArrayList&lt;Object&gt; trains=new ArrayList&lt;&gt;();  


If you need comments to describe a variable, you have named the variable poorly  
Let your code breathe, use some spacing  


for(int i=0;i&lt;(path.size()-1);i++)  



this would be easier to read like  

for (int i = 0 ; i &lt; path.size() - 1; i++)  

use methods for calculations. You should add a method which calculates the shortest path and another one that would be responsible for the output of these calculated values.  
code against interfaces instead of implementations so  


ArrayList&lt;Station&gt; changeStation =new ArrayList&lt;Station&gt;();
ArrayList&lt;Object&gt; trains=new ArrayList&lt;&gt;();  



should be  

List&lt;Station&gt; changeStation =new ArrayList&lt;&gt;();
List&lt;Lane&gt; trains=new ArrayList&lt;&gt;();  

Return from methods what the methodnames implies and name the "receiving" variable accordingly 


Lane train=e.getLaneColor();  



So the enum Lane should be become LaneColor and train should become e.g. currentLaneColor