Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: need guidance

  1. #1
    Junior Member
    Join Date
    Jun 2022
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default need guidance

    I want to implement Iterator class in similar way as DijkstraClosestFirstIterator.calss available in package org.jgrapht.alg.shortestpath; with identical imports.
    imports are available i n referenced Libraries.

        private final Graph graph;
        private final V source; 
                 (V cannot be resolved)
        private final double radius;
        private final Map>> seen;
                              (Syntax error on token Map>>)
        private AddressableHeap> heap;
                 (Syntax error on token AddressableHeap>)
    These may refer to very basic knowledge of the language, however i am stuck. I tried to find V.class in jgrapht but unable to find any.

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: need guidance

    A java source file needs to have a class statement with the name of the class:
       public class TheClassNameHere {
         // class's contents here
       }  // end of class
    If there are references to external classes, there may need to be import statements for those classes.

    Syntax error on token Map>>
    Remove the >>
    Add the type arguments for generic class Map<K,V> replacing K with the class of the key and V with the class of the value.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. need guidance
    By exuberent025 in forum Member Introductions
    Replies: 2
    Last Post: September 5th, 2014, 03:07 PM
  2. [SOLVED] Need a little guidance on overall Java
    By SauronWatchesYou in forum Java Theory & Questions
    Replies: 9
    Last Post: April 14th, 2014, 08:35 AM
  3. I Require some guidance :)
    By Vryizen in forum What's Wrong With My Code?
    Replies: 3
    Last Post: October 12th, 2013, 03:13 PM
  4. i need guidance por favor<333
    By nerdster in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 4th, 2012, 11:47 PM
  5. [SOLVED] Medication of ArrayDemo.java to include iterative menu
    By xyldon27 in forum Loops & Control Statements
    Replies: 8
    Last Post: June 30th, 2009, 02:10 AM