Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Query: The Import java.util.ArrayList cannot be resolved Java

  • 30-11-2021 6:01am
    #1
    Registered Users, Registered Users 2 Posts: 1


    Hello All, I am facing some issues while I am trying to run this java program in vs code but it shows an error on the 2nd line (The import java.util.ArrayList cannot be resolved Java(268435846)) and 6th line. But it gives correct output in an online compiler. Any suggestions?

    import java.util.List;
    import java.util.ArrayList;
    import java.util.Collection;
    public class CollectionDemo {
        public static void main(String[] args) {
            ArrayList al = new ArrayList();
            al.add(100);
            al.add("String");
            System.out.println(al);
        }
    }
    
    Tagged:


Comments

Advertisement