|
Contract Otter posted:I've now gone through two courses of Java-programming in my university and while I feel I know the basics of the syntax and object orientated programming, Don't say orientated.
|
# ¿ Mar 20, 2008 01:42 |
|
|
# ¿ Apr 28, 2024 10:23 |
|
Since you know the format of the student ID, you can use that as a reference point. Look for 3 numbers, a dash, two numbers, a dash, four numbers (use a regex!). Everything before that is the name. After that, you'll have two fields separated by whitespace, so that's easy to parse.
|
# ¿ May 23, 2008 05:20 |
|
Phillyt posted:What's a regex? A "regular expression". It's a way of matching text. I googled a bit and this looked like a good page for beginners: http://gnosis.cx/publish/programming/regular_expressions.html and here's the Java Regex lesson: http://java.sun.com/docs/books/tutorial/essential/regex/ Regexes are incredibly useful when trying to parse text. Every decent programming language has support for them. You need to know how to use them.
|
# ¿ May 23, 2008 05:58 |
|
Phillyt posted:I can't really figure out where to put the tokens. I have a .txt file named hello which is basically made up of entries like above but I am really bad at using tokens to scan it. Right now all I'm trying to do is check for \t delimiters. Here's my code: OK, so this is the core of your program. All it's doing right now is reading a line from inputStream and writing it to outputStream. What do you want it to do? Well, you want to write the output in a standardized way. You want to be able to use something like this: code:
code:
|
# ¿ May 23, 2008 06:10 |
|
shodanjr_gr posted:Yet another SWING question (i managed to hack around and get my previous one fixed :P). shodanjr_gr posted:edit: Second question, why the heck does the JVM get "clogged up" (for lack of a better term), when it captures mouse events on a container? http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html
|
# ¿ May 24, 2008 02:42 |