+ 4

Java for loops

can you explain this code char a; for(a='A'; a<='Z'; a++){ System.out.printf("%c %c",a,a+32); }

4th Sep 2018, 12:26 AM
BHOUSZJINGJING
51 Respostas
+ 3
see its a char or character means, it will print the 'A' and the ASCII of A + 32 and it's ACII will be printed
5th Dec 2020, 12:54 PM
Priyanshi
Priyanshi - avatar
+ 2
ok then Idk
4th Sep 2018, 1:31 AM
Potato Hacker
Potato Hacker - avatar
+ 1
why is that the out put is Aa Bb Cc Dd ......
4th Sep 2018, 12:26 AM
BHOUSZJINGJING
+ 1
its beacause of ;a and ; a++
4th Sep 2018, 12:44 AM
Potato Hacker
Potato Hacker - avatar
0
i mean I declared Capital letters And its automatically not capital ?
4th Sep 2018, 12:46 AM
BHOUSZJINGJING
0
;a declares the 2nd one is lowercase and a++ makes it go longer and forever
4th Sep 2018, 12:47 AM
Potato Hacker
Potato Hacker - avatar
0
autmatically low In the second declare ?
4th Sep 2018, 12:48 AM
BHOUSZJINGJING
0
that will make it run 32 times
4th Sep 2018, 12:50 AM
Potato Hacker
Potato Hacker - avatar
0
I have difficulty that +32 i did not understand it
4th Sep 2018, 12:50 AM
BHOUSZJINGJING
0
oh ok
4th Sep 2018, 12:50 AM
Potato Hacker
Potato Hacker - avatar
0
you mean the second declare run in lower letters and it runs 32 times ?
4th Sep 2018, 12:51 AM
BHOUSZJINGJING
0
yes
4th Sep 2018, 12:51 AM
Potato Hacker
Potato Hacker - avatar
0
in for loops only String not included ?
4th Sep 2018, 12:52 AM
BHOUSZJINGJING
0
no not included
4th Sep 2018, 12:52 AM
Potato Hacker
Potato Hacker - avatar
0
only char,int ?
4th Sep 2018, 12:53 AM
BHOUSZJINGJING
0
no moy only char and int
4th Sep 2018, 12:54 AM
Potato Hacker
Potato Hacker - avatar
0
not
4th Sep 2018, 12:54 AM
Potato Hacker
Potato Hacker - avatar
0
what ?
4th Sep 2018, 1:14 AM
BHOUSZJINGJING
0
i though this was somthing else sorry Yes you need it
4th Sep 2018, 1:18 AM
Potato Hacker
Potato Hacker - avatar
0
everything else i was fine with
4th Sep 2018, 1:21 AM
Potato Hacker
Potato Hacker - avatar