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.
2 problems:
Java is case sensitive, and java.text is a package, not a class. So, you need to do something like this:
import java.text.*; // imports everything in the java.text package
import java.text.*;
you forgot to add the askterisk.......
placing that asterisk sign means that you are calling all the classes in a package..
is there any 'Text Class' in java.text package?
we are using the same IDE . you can check if there is such a Class in a package.
i've check the text package there's no Text class inside of it
I am using NetBeans IDE
How can I ?
There are many ways. This kind of a problem isn't IDE dependent, though. Java.text is a standard java package, and Java.text.Text is not a standard java class.
If you don't know if your class has access to another class (probably because it doesn't exist) try:
where package is the package the class is in, and className is the name of the class. If it works, everything's good. If it doesn't and you get some error(s), then it either doesn't exist your your program doesn't have access to that class.import package.className;
I am studying java from e-book. This e-book' s writer use "import java.Text;" you can see at first example. But i don't understand. Why can' t I ?
typo on their part? That's the only thing I can think of unless they have a custom build of Java (could happen, but not likely), in which case it's hopeless unless you can get the same build