Promblems with java.io

Advertisement
November 30

hi, I just put netbens on my computer and I'm trying to write a program that will allow me to calculate some statistics on a given text. However I keep falling down at the first hurdle, can anyone help?
import java.io;
public class textStatistics
public static void main(String[] args)
File file = new File("my_data");
FileInputStream fis = new FileInputStream();
the errors are as follows...
init:
deps-jar:
Compiling 1 source file to C:\Documents and Settings\Nikki\textStatistics\build\classes
C:\Documents and Settings\Nikki\textStatistics\src\textstatistics\textStatistics.java:1: cannot resolve symbol
symbol : class io
location: package java
import java.io;
C:\Documents and Settings\Nikki\textStatistics\src\textstatistics\textStatistics.java:6: cannot resolve symbol
symbol : class File
location: class textStatistics
File file = new File("my_data");
C:\Documents and Settings\Nikki\textStatistics\src\textstatistics\textStatistics.java:6: cannot resolve symbol
symbol : class File
location: class textStatistics
File file = new File("my_data");
C:\Documents and Settings\Nikki\textStatistics\src\textstatistics\textStatistics.java:7: cannot resolve symbol
symbol : class FileInputStream
location: class textStatistics
FileInputStream fis = new FileInputStream();
C:\Documents and Settings\Nikki\textStatistics\src\textstatistics\textStatistics.java:7: cannot resolve symbol
symbol : class FileInputStream
location: class textStatistics
FileInputStream fis = new FileInputStream();
5 errors
Can anyone help?

Advertisement

Replay

thank you, I thought I tryed that but I forgot a "."
Do you know whats wrong with this line?
FileInputStream fis = new FileInputStream();
http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileInputStream.htmlLook at the constructors and you'll see.

View 7 Replies

Tags:

  1. sims resource wont download pdf files
  2. imovie program for a1151
  3. BAPI_SALESDOCUMENT_CHANGE sample
  4. hold invoice bapi
  5. centers2k
  6. moon64m
  7. dullzwf
  8. loosedgx
  9. manyi8a
  10. 7WTS
Copyrights 2019 Fcffair BigData Resource, All rights reserved