Why am I getting an "Expected Identifier" error?

Help java program error code?

  • The program is converting kilograms into pounds. I've compiled it but I keep getting this error Exercise04_05.java:22: error: ' ) ' expected integer.valueOf(kilograms), ((double) kilograms * 2.2000000000000002D), integer.valueOf(pounds), ((double) pounds / 2.2000000000000002D)}; ^ 1 error Can someone help me fix this error and compile it to see if it gives the same error? public static void main(String[] args){ System.out.printf("%10s%10s | %10s%10s\n", new object[] { "kilograms", "pounds", "pounds", "kilograms" }); System.out.println(" "); int kilograms = 1; int pounds = 20; for(int count = 1; count <= 100; count++) { System.out.printf("%10d%10.3f | %10d%10.3f\n", new object[] { integer.valueOf(kilograms), ((double) kilograms * 2.2000000000000002D), integer.valueOf(pounds), ((double) pounds / 2.2000000000000002D)}; kilograms += 2; pounds += 5; } } }

  • Answer:

    Shouldn't integer have a capital 'I'?

Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

Did you mean to use the Integer class? It is spelled with an initial capital. Java cares about the difference between 'Integer' (what you wanted) and 'integer' (what you have).

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.