Question: Hi, I am coding an alternating encryption program. I found this online but want to understand it before I use it. Can someone who is
Hi, I am coding an alternating encryption program. I found this online but want to understand it before I use it. Can someone who is more proficient in Java explain what is going on here? This is supposed to be going through each column from top to bottom, then next column bottom to top and printing one character from a user's input message.
String encrypted = "";
for(int j=0;j for(int i=0;i encrypted+=(j%2==0)?grid[i][j]:grid[rows-1-i][j]; if(j!=cols-1) encrypted+=" "; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
