Comment out the superfluous

  • 1
  • Locked
Comment out some code so that "sum = 12" appears on the screen.
You can't complete this task, because you're not signed in.
Comments (10)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Anonymous #10979006
Level 2 , United States of America, United States
10 April, 23:24
I used "/* */" instead of the "//" to indicate the comments and it was marked wrong. the output was the same so what difference does that make?
Roman
Level 41
13 April, 06:17
Please post your question with the attached solution in the section Help.
Gerri
Level 2 , United States of America, United States
8 March, 05:22
That made me think
javist Android Developer
26 February, 18:42
code entry
Siyanda Dlamini
Level 7 , Durban, South Africa
15 February, 20:43
Wow that was challenging
Anonymous #10890452
Level 2 , Gurgaon, India
1 December 2021, 14:46
a=6; b=3; sum=3+a+b;
Anonymous #10890452
Level 2 , Gurgaon, India
1 December 2021, 14:43
same variables wont access compiler how this acess a and a b and b ?
TinCanSailor QC Analyst at Ultramain Systems, I
17 December 2021, 05:25
Did you comment out at least one 'a' variable and one 'b' variable?
public class Solution {
    public static void main(String[] args) {
        int a = 3;
        //int a = 10;
        int b = 6;
        //int b = 12;
        //int sum = 1 + a + b;
        //int sum = 2 + a + b;
        int sum = 3 + a + b;
        //int sum = 4 + a + b;

        System.out.println("sum = " + sum);
ABHISHEK SINGH
Level 6 , India, India
25 October 2021, 07:23
how to add string sum
mouna
Level 2
17 January, 22:42
also with+ or with methode append