no that is not allowed class Formatter dont include method newLine
so I can't use newLine() on Formatter object
an also when I wite
output.format("/n") it print /n in the file
if I print output.format(/n) also there is error...
User Profile
Collapse
-
print new line in files
how can I print new line in a file using a reference to Formatter object
Code://create reference to file to read from Scanner input=new Scanner(new File("d:\\records1.txt")); //create reference to file to write Formatter output=new Formatter("d:\\records7.txt"); while(input.hasNext()){ output.format(input.nextLine()); output.format();
-
Constructors
I have a problem with the output of this program
this program consist of three classes
the fist one is
Code:package c; public class CommissionEmployee4 { private String firstName; private String lastName; private String socialSecurityNumber; private double grossSales; // gross weekly sales private double commissionRate; // commission percentage
-
No,Just i installed IBM.WebSphere.A pplication.Serv er.V6.0
Isn't it enough?...Leave a comment:
-
should I create a folder for the application?
I wrote that piece of code in notepad and saved with extention .jsp
and opened it with the browser?
But I use the websphere web server
I think I save my .jsp file in aspecific path and use a specific path to load the file in the browser,I mean the host name.
But I don't know what is the suitable host...Leave a comment:
-
-
in this path
C:\Program Files\IBM\WebSp here\AppServer\ profiles\defaul t\temp\SERVER_N AME\server1...Leave a comment:
-
JSP problem
I installed IBM WebSphere Application Server V6.0 and I already installed JDK 6.0
when i wrote that a piece of code in the notepad and saved it with the extention .jsp then i open it with my browser the output was The time is now without displaying the time..WHY?What is the problem?
Code:<HTML> <BODY> Hello! The time is now <%= new java.util.Date() %> </BODY> </HTML>
-
-
Csv
to open a CSV file and read and write from it?
Is it like opening a normal files and reading from them?Or it is different ?
If it What are the technologies that I need? -
Eclipse
Is Eclipse free IDE?If it's free I need alink to download it
Which one is better for me Eclipse or Sun jave Studio Enterprise?
Iam a new java programmer just develop simple OO appliactions?
I intend to be a web programer and starting to learn JSP
Is there other technologies I need to learn to be a web programmer?
What are the tools I need to develop JSP and web appplications?
What is the... -
-
My long-term Goal
Iam a java beginner,just I can develop simple java applications.
But I want to be an expert JSP web developer .
What are the things that I should do, the techniques that I should study and what are the short-tearm goals that I should achieve to accomplish my long-term goal . What the time and the experiences that are needed to achieve my goal? -
Is there any way to download this video instead of listening to it online?...Leave a comment:
-
But I already use SJSE for developing and running J2SE application...Leave a comment:
-
Sun Java Studio Enterprise
Is ther any material, Vedio , Websites for learning how to use the IDE of Sun Java Studio Enterprise . I already use the help file of the programe but I need an extra material for learning how to use it . -
netbeans-5_0-windows
Is this IDE good and suitable for developing and debugging the J2SE Application
and what about The IDE of sun java studio enterprise ,is it better? -
Hi,
I developed this code to solve this problem
I think this is shorter
Code:import java.util.Scanner; //import class Scanner for the input public class DiamondNumbers { public static void main(String[] args) { final int N=1; System.out.println( "Enter your centered number Starting from number 1" ); Scanner input =new Scanner(System.in);
Leave a comment:
-
ok i know that but my problem is how write code to do that
how to print 3 spaces using the code
how to tell it print 2 or 3 spaces , printing spacing like this" " ," " not suitable with my code
is not there another way to do this?iside the firs for
Code:for(int x=0;x<centeredNumber;x++)
in the second loop, i wanna print...Leave a comment:
-
No activity results to display
Show More
Leave a comment: