Elemental_1_1's Profile
Reputation: 0
Apprentice
- Group:
- Active Members
- Active Posts:
- 99 (0.06 per day)
- Joined:
- 22-January 09
- Profile Views:
- 1,894
- Last Active:
May 03 2012 02:01 PM- Currently:
- Offline
Previous Fields
- Country:
- AU
- OS Preference:
- Linux
- Favorite Browser:
- FireFox
- Favorite Processor:
- AMD
- Favorite Gaming Platform:
- PC
- Your Car:
- Who Cares
- Dream Kudos:
- 0
Latest Visitors
-
pbl 
22 Dec 2011 - 04:53 -
successfulangel 
17 Jul 2011 - 10:28 -
macosxnerd101 
28 Jun 2011 - 06:22
Posts I've Made
-
In Topic: Posting to an ASP.net/PHP web page through Java
Posted 30 Apr 2012
I found this during my research, I guess it just needs more googlin'
Thanks for the help. -
In Topic: Will not write to .txt?
Posted 22 Dec 2011
awmygosh its so hard to read.
well, when i use filereader/writer i use try catch finally, I dont know if that will help you though. why are all your variables funnily named? what kind of project is this for, if you dont mind me asking? -
In Topic: nextLine() assigns a value to a String but the value doesnt trigger
Posted 22 Dec 2011
thanks! -
In Topic: Null Pointer Exception in a Word Counter
Posted 21 Dec 2011
yeeey it all works!
for some reason I cant +1 posts, sorry 
import java.util.Scanner; import java.io.FileReader; import java.io.StringWriter; import java.io.IOException; import java.io.FileNotFoundException; import java.io.File; //class sentenceCounter { // public static int count(String str) { // String delim = " "; // String[] words; // words = str.split(delim); // return words.length; // } //} class fileCounter { public static int count(String file) throws IOException { FileReader inputStream = null; StringWriter writer = new StringWriter(); try { inputStream = new FileReader(file); int c; while ((c = inputStream.read()) != -1) { writer.write(c); } } catch (FileNotFoundException e) { System.out.println(file + " does not exist."); } finally { if (inputStream != null) { inputStream.close(); } if (writer != null) { writer.close(); } } String str = writer.toString(); String delim = " "; String[] words; words = str.split(delim); return words.length; } } class wordCount { public static void main(String[] args) throws IOException { System.out.println("Type the text file name here, then press enter: "); Scanner scan = new Scanner(System.in); String name = scan.nextLine(); File findFile = new File(name); if (findFile.isFile() != false) { System.out.println("Your file contains " + fileCounter.count(name) + " words."); } else { fileCounter.count(name); } } } -
In Topic: Retreive Data From Database
Posted 21 Dec 2011
more info?? what database are you using?
My Information
- Member Title:
- D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
-
- Years Programming:
- 3
- Programming Languages:
-
Current: Java
Have used: HTML, CSS, Javascript, PHP, MySQL, C++.
Contact Information
- E-mail:
- Private
- Website URL:
-
http://
Friends
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
successfulangel
09 Jul 2011 - 23:46