Hey guys I was wondering if I could get some help with something. I have a java class Text.java which just contains a severly long string (it's text from a website but stored in u006e values and such) I am creating a data mining class and was just wondering how to reference the string so that i can test things like the length and count refrences to numbers and stuff like that? the actual class is Text.java and the actual code is:
public class Text
* A very long String, containing text from a web site.
public static final String TEXT;
TEXT = //this is where the extremely long string is composed of u006c/u006e and so on
public class DataMiner
* Main Method, or main point of entry in the Java application.
* @param args not used
public static void main(String args)
System.out.printf("The total length of input lines are: ", Text.length());
For a quick fix try this
System.out.printf("The total length of input lines are: %d \n", Text.length());
However better would be to create a method on Text called length that returns TEXT.length() or simply change to Text.TEXT.length() - Personally I would use the first choice and have TEXT as a private field