Results 1 to 3 of 3

Thread: java.util

  1. #1
    Join Date
    Jul 2011
    Posts
    13
    Rep Power
    0

    Default java.util [SOLVED]

    This might sound silly but I'm having problems importing java.util into my program. I can't find it/don't know how to import it, basically if I try compile without it, it bring up the error "cannot find symbol - class util".

    This is all I've got so far
    Java Code:
    import java.util;
    
    public class Program
    {
     
        public static void main(String[] args)
        {
            
        }
    }
    Thank you for any help!
    Last edited by DuncanHollows; 03-19-2012 at 04:24 PM.

  2. #2
    Join Date
    Apr 2010
    Location
    Warakapola, Sri Lanka
    Posts
    15
    Rep Power
    0

    Default Re: java.util

    you have missed .*
    full import statement(for util package) should be,
    import java.util.*;
    or
    you can import only one class in the util package as shown below,

    import java.util.Scanner;
    import java.util.Date;

  3. #3
    Join Date
    Jul 2011
    Posts
    13
    Rep Power
    0

    Default Re: java.util

    Thank you very much, I was frantically looking through all my lecture notes for this :D

Similar Threads

  1. java.util.LinkedList;
    By Andrew_2 in forum New To Java
    Replies: 4
    Last Post: 03-25-2011, 04:40 AM
  2. java.util.Preferences
    By jon80 in forum New To Java
    Replies: 0
    Last Post: 06-06-2009, 11:28 PM
  3. import java.util ????
    By kris09 in forum New To Java
    Replies: 3
    Last Post: 08-11-2008, 12:39 AM
  4. java.util.zip Question
    By acp26b in forum New To Java
    Replies: 3
    Last Post: 08-07-2008, 05:12 AM
  5. java.util
    By Java Tutorial in forum Java Tutorial
    Replies: 1
    Last Post: 02-07-2008, 01:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •