+ 5
Confused...java array using ternary
how do i print 2 elements seprate without them adding when the statment returns false to (j<8)? The print has been casted to char, l is print for(int i = x.length,j=-7;i>j;++j) { l(j<8?x[8]:x[3] , x[5] ; //<just this part after : } thanks
2 Respostas
+ 3
Maybe something like this :
System.out.println(j<8?x[8]:x[3]+""+x[5]);
+ 2
thanks but i didnt want to use println() as i have casted println method from string to char