hi guys am new please i your help to debug the error with this code am working with String output="Sum of the Addition of "+num1+" "+num2+" "+num3+" "+num4+" Sum

Recommended Answers

@stultuske Logically the sum here is a variable, for ex: Sum of the Addition of 1 2 3 4 is 10

@OMDYD Try this

String output="Sum of the Addition of "+num1+" "+num2+" "+num3+" "+num4+" is "+Sum;
Jump to Post

All 2 Replies

String output="Sum of the Addition of "+num1+" "+num2+" "+num3+" "+num4+" Sum
is missing a "; at the end. it should be:

String output="Sum of the Addition of "+num1+" "+num2+" "+num3+" "+num4+" Sum";

or: you didn't close your String literal, as your error message said.

@stultuske Logically the sum here is a variable, for ex: Sum of the Addition of 1 2 3 4 is 10

@OMDYD Try this

String output="Sum of the Addition of "+num1+" "+num2+" "+num3+" "+num4+" is "+Sum;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.