+ 1

If i want to display my format with giving space as like this

taxino name kilometres travelled bill amount

13th Jan 2018, 1:29 PM
Harsh Agrawal
Harsh Agrawal - avatar
10 Answers
+ 2
You could use something like System.out.println("hello \t there"); to insert tabs
13th Jan 2018, 1:35 PM
Dan Walker
Dan Walker - avatar
+ 2
System.out.print() prints on the same line. I think println sends a \n character so every statement will begin on a new line
13th Jan 2018, 1:39 PM
Dan Walker
Dan Walker - avatar
+ 1
If I want to display there no in next line so what can I use
13th Jan 2018, 1:37 PM
Harsh Agrawal
Harsh Agrawal - avatar
+ 1
okk thnx
13th Jan 2018, 2:01 PM
Harsh Agrawal
Harsh Agrawal - avatar
0
what I did nt understand can u explain me again in simple language
13th Jan 2018, 1:40 PM
Harsh Agrawal
Harsh Agrawal - avatar
0
I'm not exactly sure what you're asking. Do you want the bill amount on a new line? Maybe post any code you have, might make it clearer :)
13th Jan 2018, 1:43 PM
Dan Walker
Dan Walker - avatar
0
yes bro I m asking about to find bill amount..
13th Jan 2018, 1:44 PM
Harsh Agrawal
Harsh Agrawal - avatar
0
ok so System.out.println("taxino\t name kilometers travelled \n bill amount"); The \n starts a new line. Alternatively you could do two println statements, each one will be on new line obviously use variables where you need them to display numbers
13th Jan 2018, 1:47 PM
Dan Walker
Dan Walker - avatar
0
okk but if I want to print their number,name etc in the next line so what can I do???
13th Jan 2018, 1:49 PM
Harsh Agrawal
Harsh Agrawal - avatar
0
Just use more \n characters wherever you want a new line. Try it with a code and post it, it will be much easier
13th Jan 2018, 1:58 PM
Dan Walker
Dan Walker - avatar