Results 1 to 3 of 3
Thread: Not initialized variable
- 06-27-2007, 04:26 AM #1
Senior Member
- Join Date
- Jun 2007
- Posts
- 132
- Rep Power
- 0
Not initialized variable
Why do I have an error in this line? fis.read(readers);
This is my code
Java Code:FileInputStream fis; File file; int sizeFis; file = new File("C:\\fasmw167\\sambler\\textbox 3\\ textbox3.ASM"); sizeFis = (int) file.length(); byte readers[] = new byte[sizeFis]; try { fis = new FileInputStream(file); } catch (FileNotFoundException e) { } try { fis.read(readers); } catch (IOException e) { } String s = new String(readers); jTextArea1.append(s)
- 07-04-2007, 09:00 AM #2
Senior Member
- Join Date
- Jun 2007
- Posts
- 130
- Rep Power
- 0
You have to do like this:
FileInputStream fis = null;
- 07-04-2007, 09:02 AM #3
Senior Member
- Join Date
- Jun 2007
- Posts
- 110
- Rep Power
- 0
Similar Threads
-
getting the value of variable
By Lehane_9 in forum New To JavaReplies: 2Last Post: 03-05-2008, 01:42 AM -
Getting variable value from a variable name
By Java Tip in forum Java TipReplies: 0Last Post: 02-16-2008, 09:26 PM -
Variable No. of Arguments
By Gajesh Tripathi in forum New To JavaReplies: 2Last Post: 10-31-2007, 02:50 PM -
Create a new variable
By mathias in forum New To JavaReplies: 1Last Post: 08-07-2007, 06:48 AM -
String Variable
By Eric in forum Advanced JavaReplies: 1Last Post: 06-06-2007, 04:30 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks