+ 2
How to print sideways in Java .
I am trying to write a program sideways like this. 1111 2222. So please help me with the need..
16 Respostas
+ 3
there are printf() or String.repeat(),
System.out.println (i+""+""+i+""+""+i+""+""+j) ;
System.out.println (i+" "+i+" "+i+" "+j) ; //better
System.out.println (i+"\t"+i+"\t"+i+"\t"+j) ; // or
\t is for tabulator
+ 1
+ 1
use " quotation mark instead of ' apostrophe
+ 1
I got how to write sideways
+ 1
Aryan Goel yes u can write . U tried whole program and u asking what is \t first learn basics.
0
Can u give the way to write that way
0
public class Program
{
public static void main(String[] args)
{
int i=1;
int j=2;
System.out.println (i+""+""+i+""+""+i+""+""+j) ;
}
}
//*This is my program*//
0
Use \t for doing it. What do u mean by this.?
0
Can u apply it in a program
0
Thank you zemiak for your help but it is showing some errors can you help to get my way out.
public class Program
{
public static void main(String[] args)
{
int i=1;
int j=2;
}
System.out.println(i+'\t'+i+'\t'+i+'\t'+j);
}
0
It The last statement instead of writing System.out.println
We can write
System.out.print
0
Thanks alotDeek