• Post Reply Bookmark Topic Watch Topic
  • New Topic

errors  RSS feed

 
Dinushi Chathu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone explain what are the errors in this program and how to fix them?

class Test{
public static void main(String args[]){
char a[]={o , o , h}; char b[]={k , s , a};
char c[]= new char[6];
for (int i=0,k=0,m=0;i<=c.length-1; ++i)
{
if(i%2 == 0){
c[i] = a[k];
k++;
}
else{
c[i] = b[m];
m++;
}
}
for (int i=0;i<=c.length-1; ++i)
System.out.print(c[i]);
}
}
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66306
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What errors are you seeing?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!