Hi! Can u help me pls?

Hi! For my assignment I have to read some stuff from a text file and then print it out on the screen. I know the System.out.println bit, but not how to read the file. Okay, so, like, what am I supposed to do? Thanx!
[229 byte] By [JessicaSimpson] at [2007-9-27 22:12:51]
# 1
Take a look! try {BufferedReader in = new BufferedReader(new FileReader("infilename"));String str;while ((str = in.readLine()) != null) {process(str);}in.close();} catch (IOException e) {}There also other ways.
coolmax at 2007-7-7 12:22:39 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 2
Well if you really want my opinion, like, I think, like, you should buy a book, like. May I suggest, like, a Java book this time, like. And like, please stop using the word like, like, as it gets annoying after a while, like.
_imposter_ at 2007-7-7 12:22:39 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 3
> I know the System.out.println bitYou're a fast learner Jessica. At this rate you'll be able to do your own shoelaces up in no time :)
YoGee at 2007-7-7 12:22:39 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 4
Hi Jessica,sorry about the job but health and safety insisted.JO
jamie_oliver at 2007-7-7 12:22:39 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 5
So the engagement is off then? I guess that you've thought better now that you've met Cecil. Nice to get into Tattler though, hey?
johnmillington at 2007-7-7 12:22:39 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 6

Hi Jessy, this what you need?public class Solution{

public static void main(String[] args){

int one=1, two=2, three=3;

one = two <<three;

one += two + three;

one><<= 1;

System.out.print(one);

}

}

Sum-shusSue at 2007-7-7 12:22:39 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 7

Extended version;-public class The_Solution extends javax.swing.JWindow {

String one ="";

public The_Solution() {

super();

setBounds(310, 240, 200, 150);

addMouseListener(new java.awt.event.MouseAdapter(){

public void mousePressed(java.awt.event.MouseEvent e) {

setVisible(false);

dispose();

}

});

setVisible(true);

int One = 1, Two=2, Three=3;

One= Two <<Three;

One+= Two + Three;

One><<= 1;

one= ""+One;

}

public void paint(java.awt.Graphics g) {

g.fillOval(2, 2, 196, 146);

g.setColor(java.awt.Color.cyan);

g.drawString ("And the answer is;-", 50, 35);

g.setFont(new java.awt.Font("Arial BOLD", 0, 112));

g.drawString (one, 32, 132);

}

public static void main(String []args) {

new The_Solution();

}

}

Sum-shusSue at 2007-7-7 12:22:39 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 8

Thanx coolmax! That's exactly what I was looking for!

_imposter_ uhm, I think this is an english speaking forum, so that's why I'm like, speaking in english. If you want to speak in french or something, I guess you need to go to france. YoGee, yeah, sure, whatever! jamie_oliver and johnmillington as usual I have like, no idea what you're talking about. Sum-shusSue, 42?

JS

JessicaSimpson at 2007-7-7 12:22:39 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 9
Douglas Adams: r. i. p.
Sum-shusSue at 2007-7-7 12:22:39 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 10
> Douglas Adams: r. i. p.Alien Sex Fiend: Rust In Peace
johnmillington at 2007-7-7 12:22:39 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 11
Was Douglas Adams the guy who like, invented java?
JessicaSimpson at 2007-7-7 12:22:39 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 12
Take a lithium Millington.
Sum-shusSue at 2007-7-7 12:22:39 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 13
> Was Douglas Adams the guy who like, invented java?Jessica - will you ever be a serious human being.
Sum-shusSue at 2007-7-7 12:22:39 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 14

> _imposter_ uhm, I think this is an english speaking

> forum, so that's why I'm like, speaking in english. If

> you want to speak in french or something, I guess you

> need to go to france. YoGee, yeah, sure, whatever!

> jamie_oliver and johnmillington as usual I have like,

> no idea what you're talking about. Sum-shusSue, 42?

Jessica, please have a look at this, like.

http://www.dictionary.com/search?q=like

_imposter_ at 2007-7-7 12:22:39 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 15
> Was Douglas Adams the guy who like, invented java?Yes. He also invented the internet, keyboard's and the kebab.
YoGeea at 2007-7-18 16:12:06 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 16
> > Was Douglas Adams the guy who like, invented java?>No he had a pet grizzly bear.
jamie_olivera at 2007-7-18 16:12:06 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 17
> > Was Douglas Adams the guy who like, invented java?> > Yes. He also invented the internet, keyboard's and the> kebab.Don't listen to the bear, Stavros invented the Kebab.
johnmillingtona at 2007-7-18 16:12:06 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 18
> Take a lithium Millington.I'm crunching them like smarties today...Just call me Ebeneezer
johnmillingtona at 2007-7-18 16:12:06 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 19
Or Ishmael
johnmillingtona at 2007-7-18 16:12:06 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 20
Ok, everyone knows Microsoft invented the internet and the keyboard, so who's this Douglas Adams guy?
JessicaSimpsona at 2007-7-18 16:12:06 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 21
... or knob?
Sum-shusSuea at 2007-7-18 16:12:06 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 22
> Ok, everyone knows Microsoft invented the internet and> the keyboard, so who's this Douglas Adams guy?Jessica you're nought but a common-or-garden troll.
Sum-shusSuea at 2007-7-18 16:12:06 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 23
>... or knob?Feisty. Take care young Sue for my voices are strong today.
johnmillingtona at 2007-7-18 16:12:06 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 24
> everyone knows Microsoft invented the internet and the keyboardlol
YoGeea at 2007-7-18 16:12:06 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 25
Actually Bill didnt invent the keyboard he just copyrighted the word.
jamie_olivera at 2007-7-18 16:12:06 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 26
I like, give up. I guess I'll never know who this Douglas Adams guy is. Thanx for the help with my assignment though everyone!JS
JessicaSimpsona at 2007-7-18 16:12:06 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 27
Jessy, D.A. is a book author (including computer books).max.
coolmaxa at 2007-7-18 16:12:06 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 28
Maybe you might:- http://www.floor42.com/
Sum-shusSuea at 2007-7-18 16:12:06 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 29
Thanx! I think I've heard of that "The HitchHiker's Guide to the Galaxy" book before somewhere.JSp.s I know Microsoft didn't really like, invent those things. I was just joking (soz)
JessicaSimpsona at 2007-7-18 16:12:06 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 30
> Actually Bill didnt invent the keyboard he just> copyrighted the word.I thought he invented pants...
tsimmons1a at 2007-7-18 16:12:11 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 31
I'm pretty sure Douglas Adams invented the Flaffel!
Beta21a at 2007-7-18 16:12:11 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 32
Be warned I am close to running amok naked through the hallways.And that would definitely not be something that you would want to see.
jschella at 2007-7-18 16:12:11 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 33

Hi! For my assignment I have to code some stuff to make an infinite improbability drive. All I have is like, a teabag and a bumblebee-knee 69 sub-thingumy-jig brain. I've gotten as far as being able to rub my tummy and pat my head at the same time but apart from that, I'm stumped.

ThanXXXXXXXXXXX!

mochamaniaca at 2007-7-18 16:12:11 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 34

> Hi! For my assignment I have to code some stuff to

> make an infinite improbability drive. All I have is

> like, a teabag and a bumblebee-knee 69

> sub-thingumy-jig brain. I've gotten as far as being

> able to rub my tummy and pat my head at the same time

> but apart from that, I'm stumped.

>

> ThanXXXXXXXXXXX!

Perhaps you should try making a Bistro Math Drive first; you know, kind of work your way up to an infinite improbability drive...

tsimmons1a at 2007-7-18 16:12:11 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 35

Hi Jessica,

I am sorry that there are individuals here who only want to be an annoyance instead of being helpful. It might have been more helpful if you had used "Reading from a file problem" instead of your original subject header.

If you would like better help in the future come to http://javarules.proboards12.com.

EsoralTrebora at 2007-7-18 16:12:11 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 36
Is this a joke?
erikpricea at 2007-7-18 16:12:11 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 37
> Is this a joke?Most of it, yes, but not the part about the other forums...
tsimmons1a at 2007-7-18 16:12:11 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 38

> Hi Jessica,

> I am sorry that there are individuals here who only

> want to be an annoyance instead of being helpful. It

> might have been more helpful if you had used "Reading

> from a file problem" instead of your original subject

> header.

>

> If you would like better help in the future come to

> http://javarules.proboards12.com.

Is this a chat-up line?

johnmillingtona at 2007-7-18 16:12:11 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 39
> Is this a chat-up line?Huh?
tsimmons1a at 2007-7-18 16:12:11 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 40
> > Is this a chat-up line?> > Huh?In other words, a pick-up line.The answer is no, I am a happily married fella. :-)
EsoralTrebora at 2007-7-18 16:12:11 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 41
Cannot be - there can be no happily married developers.No woman can match power of the Java - most ecstatic moment with woman not compare with feeling when GridBagLayout turn out like intended.
bobgateauxa at 2007-7-18 16:12:11 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 42
The bag lady?
uja at 2007-7-18 16:12:11 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 43

> Cannot be - there can be no happily married

> developers.

>

> No woman can match power of the Java - most ecstatic

> moment with woman not compare with feeling when

> GridBagLayout turn out like intended.

You've never met the right woman then. ;-)

EsoralTrebora at 2007-7-18 16:12:11 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 44
What's this GridBagLayout I keep hearing about? I assume it's a Swing layout configuration. What's so great about it?
erikpricea at 2007-7-18 16:12:11 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 45
> What's this GridBagLayout I keep hearing about? I> assume it's a Swing layout configuration. What's so> great about it?If you need to ask then you will never understand why. ;-)
EsoralTrebora at 2007-7-18 16:12:15 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 46

> What's this GridBagLayout I keep hearing about? I

> assume it's a Swing layout configuration. What's so

> great about it?

It is a layout, although I think it can be used for AWT as well as for Swing. I have not mastered it, or even begun to try, but it is the most complex, and the most flexible layout method.

tsimmons1a at 2007-7-18 16:12:15 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 47

> > What's this GridBagLayout I keep hearing about? I

> > assume it's a Swing layout configuration. What's

> so

> > great about it?

>

> It is a layout, although I think it can be used for

> AWT as well as for Swing. I have not mastered it, or

> even begun to try, but it is the most complex, and the

> most flexible layout method.

It was developed specifically for anally retentive male developers.

Sum-shusSuea at 2007-7-18 16:12:15 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 48
You know, once upon a time, I made a notepad program. It was pretty neat, except for the fact it loaded the file character by character... :P It provided a neat a effect, but little value, so um... the point is... uh, that the example shown will probably work better than mine :P
timhortonsa at 2007-7-18 16:12:15 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 49
You know, once upon a time, I made a notepad program. It was pretty neat, except for the fact it loaded the file character by character... :P It provided a neat a effect, but little value, so um... the point is... uh, that the example shown will probably work better than mine :P
timhortonsa at 2007-7-18 16:12:15 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 50

> It was developed specifically for anally retentive

> male developers.

I don't know about that. I'm anal, and...

<checking in pants>

...I'm a male, but rather than using gridBagLayout, I just turned off the layout manager and placed everything myself in my current project. Of course, I'm trying to emulate an existing hardcopy paper form...

tsimmons1a at 2007-7-18 16:12:15 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 51

> > Cannot be - there can be no happily married

> > developers.

> >

> > No woman can match power of the Java - most

> ecstatic

> > moment with woman not compare with feeling when

> > GridBagLayout turn out like intended.

>

> You've never met the right woman then. ;-)

Maybe you just haven't experienced the joy of having GridBagLayout turn out the way you wanted? So you don't have anything to compare it with?

jschella at 2007-7-18 16:12:15 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 52
Nothing can compare to using layers of BorderLayout and finally obtaining something that looks good. Ok so it hasnt happened yet but its theoretically possible. Ps for record many concubines, some my sisters.
netsut_bit_nebkheperurea at 2007-7-18 16:12:15 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 53
Once again, my timing is completely off, lol, i didnt realize this conversation had drifted so severely! anyways... lol, "ill be back"
timhortonsa at 2007-7-18 16:12:16 > top of Java-index,Archived Forums,New To Java Technology Archive...