473,386 Members | 1,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

enters in java

I want to make a message allert in Java.
That's no problem for me.
But the text is pretty long, and I don't know how to make enters in Java.
So, how can I make an enter or a empty line in Java?

grtz
Jenny
Jul 17 '05 #1
6 1997
c(h)at wrote:
I want to make a message allert in Java.
That's no problem for me.
But the text is pretty long, and I don't know how to make enters in Java.
So, how can I make an enter or a empty line in Java?

grtz
Jenny

If you are using Strings to display the message the thing you are
looking for is the newline character in java it is: '\n', you could do
something like:
"dear user,\nyou have just crashed the program, thank you"
the output of this would be like:

dear user,
you have just crashed the program, thank you

grtn,
Erik

Jul 17 '05 #2
c(h)at wrote:
I want to make a message allert in Java.
That's no problem for me.
But the text is pretty long, and I don't know how to make enters in Java.
So, how can I make an enter or a empty line in Java?

grtz
Jenny

\n
Jul 17 '05 #3
> > I want to make a message allert in Java.
That's no problem for me.
But the text is pretty long, and I don't know how to make enters in Java. So, how can I make an enter or a empty line in Java?

\n


Thank you very much!
Jul 17 '05 #4
> > I want to make a message allert in Java.
That's no problem for me.
But the text is pretty long, and I don't know how to make enters in Java. So, how can I make an enter or a empty line in Java?

If you are using Strings to display the message the thing you are
looking for is the newline character in java it is: '\n', you could do
something like:
"dear user,\nyou have just crashed the program, thank you"
the output of this would be like:
dear user,
you have just crashed the program, thank you


Thank you very much!
Jul 17 '05 #5
c(h)at wrote:
I want to make a message allert in Java.
That's no problem for me.
But the text is pretty long, and I don't know how to make enters in Java.
So, how can I make an enter or a empty line in Java?

grtz
Jenny

You need to use an escape character. if you have something like:
String s = new String("This is a \n short string or something.");
The output is:
This is a
short string or something.
the escape character \n produces a newline.
Jul 17 '05 #6
""c\(h\)at" <j.**************@home.nl>" wrote in comp.lang.java:
I want to make a message allert in Java.
That's no problem for me.
But the text is pretty long, and I don't know how to make enters in Java.
So, how can I make an enter or a empty line in Java?


In addition to the other responses, you can also produce an empty line
to the Console using the following code:

System.out.println();

--
Randolf Richardson, pro-active spam fighter - rr@8x.ca
Vancouver, British Columbia, Canada

Sending eMail to other SMTP servers is a privilege.
Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Mr. x | last post by:
Hello, I need a script for counting the no. of enters on my site, please. I need a check that for the same user in the same day - if the user enter several times, it is count once (or something...
5
by: kw | last post by:
Hello, I am trying to put up a page for my students for them to be able to enter their class number into a field and instantly get a personalized text message. (ie student number 5 enters "5"...
0
by: Adriaan van Heerden | last post by:
hi, I'm very new to Access and have been searching newsgroups for a few days but can't find exactly what I need. I want to be able to do the following: * user enters patient's hospital number *...
4
by: santa19992000 | last post by:
can I use scanf to get input (some times user enters input sometimes not, just hit keyboard)?. It displays to enter IP address, if user wants to change, then he enters, otherwise he hits keyboard,...
1
by: Mr. x | last post by:
Hello, I need a script for counting the no. of enters on my site, please. I need a check that for the same user in the same day - if the user enter several times, it is count once (or something...
1
by: tcb | last post by:
I have a RangeValidator setup for two input fields. The validator Type is set to Integer. If the user enters an alpha numeric, the validator works, however, if the user enters a space, the validator...
4
by: cb.brite | last post by:
Hello, I have tried this using the MouseEnter/MouseLeave events. However these events do not really refer to the rectangular shape of the form, but the client area (form area minus children...
0
by: rajbala | last post by:
Hi all, I want to restrict tomcatserver files to particularly one client that who enters username and password correctly anywhere in web(specifically in another system).But nobody...
2
by: eddy556 | last post by:
Hey, Im having trouble making a textbox change colour when a user enters it. I have managed to textBox2.BackColor = Color.Pink; place that in the code which seems to work but I wish for it to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.