Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

What's wrong with my java code ?

class Array_Table {

public static void main(String arg[]){

int osho[] = {12,12,34,12,24};

System.out.println("Index\tValue");

for (int counter = 0; counter<osho.length; counter++){

System.out.printf(" %d \t %d", counter, osho[counter]);

}

}

}

Problem occurs on line 8th it says

The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String, int, int)

There are no answers yet.
Be the first to answer this question.