AS Steve Luke write
If you look at the HTML source code you will see that each number is on a different line.
because <br> tag.
& as vedha vas give us small but right program.
With referring both & with my original question i am trying to say that:- I read "JavaServer Pages enable you to write
standard HTML Pages containing tags that run powerful program based on
Java Programing Language".
HTML Tag example <br>
Scripting element Scriplet example is <% java code %>
Now i want if within <% and %> there is java code, then why println() dont give result as give it us in core java program? Within <% & %> there code is no relation with HTML.
AS vedha vas gives example
out.println(i+"<br>"); But it is HTML tag within java code.
There are various ways of writing server code that build on top of the basic Servlet classes. JSP and Freemarker let you embed bits of Java code, and other scripting inside your HTML pages. These are parsed and converted to Java Servlet programs that dynamically generate HTML with variable fields. These are automatically recompiled as needed.
This lines i write from here.
In addition
I read following link
println() line Separator &
In Printstream.java i read
in same
So when we write (If we write this 2 times)System.out.println("abc");
we get result
abc
abc
In again adition i read following
public abstract void println()
throws java.io.IOException
Terminate the current line by writing the line separator string. The line separator string is defined by the system property line.separator, and is not necessarily a single newline character ('\n').
Throws:java.io.IOException -
which is written in this link.
But i didn't found this works like written in bold above.
Same question ask in
javaranch forum.
Same ask in sun java
forum.
But i didn't found satisfying answer.
By reading so much & didn't get answer so i confuse so much.
[ July 23, 2008: Message edited by: Mandar Khire ]