in java in my string.any ideas?the tab works "\t" though
4/10/2006 11:10:22 PM
\\n
4/10/2006 11:13:29 PM
^ sorta, but i don't want the "\n" to appear i want it to go to the next line
4/10/2006 11:18:21 PM
\n is for wimps. use ascii code
4/10/2006 11:23:17 PM
don't think it makes a difference as far as the spec goes, but what version of Java are you running? ('prompt% java -version' on the command line)everything in quotes too?[Edited on April 11, 2006 at 12:18 AM. Reason : ---]
4/11/2006 12:17:48 AM
this has to be operator error. and not the programming type of operator.
4/11/2006 12:25:04 AM
this is what happens when you get women programmers
4/11/2006 1:32:10 AM
use this to get the correct line separator:
String newline = System.getProperty("line.separator");
System.out.println("");
4/11/2006 10:11:20 AM
4/11/2006 3:20:50 PM
you do it that way for platform portability, which is the major thing Java has going for it. Write once, run anywhere\n on UNIX/Linux, \r\n on Windows, and \r on Mac
4/11/2006 6:46:43 PM
0x0A = carriage return0x0D = line feeda new line in windows is carriage return+line feed. in linux it's just line feed (a.k.a. EOL -- "end of line") and on an apple machine it's a carriage return. i think it's retarded but thats what it is.
4/11/2006 7:04:20 PM
'\n'[Edited on April 11, 2006 at 7:24 PM. Reason : new line 'character']
4/11/2006 7:19:45 PM
\n is character 0x0D, which doesn't produce a new line on all platforms. see ^^^ and ^^.[Edited on April 11, 2006 at 8:18 PM. Reason : ]
4/11/2006 8:18:12 PM
\n has worked without issue for me in both lunix and windows
4/11/2006 8:25:21 PM
you should specify Win32try opening text with \n as line seperator in Notepad.....not pretty.
4/11/2006 8:39:08 PM
then use wordpadalso, fuck platform portability.
4/11/2006 9:19:57 PM
4/11/2006 10:52:55 PM
#ifdef WIN32#define NEWLINE "\r\n"#endif#ifdef MAC#define NEWLINE "\r"#endif#ifdef UNIX#define NEWLINE "\n"#endif
4/11/2006 11:12:47 PM
^ std::endl
4/11/2006 11:24:05 PM
4/11/2006 11:31:41 PM
why the fuck even bother with a newline if you're not writing a human readable file. and don't give me that delimiting shit - there are plenty of better options for that shit
4/12/2006 8:38:18 AM
| all the way!
4/12/2006 9:20:07 AM
Are you using this to display in a JTextField. If so, you can only display one line. Change the JTextField to a JTextArea, so you can display multiple lines.(especially if this is for csc116 lab 9).
4/14/2006 12:57:47 AM