Sunday, August 6, 2023

Complete the code segment to debug / complete the program which is intended to print 'NPTEL JAVA'.


 

Complete the code segment to debug / complete the program which is intended to print 'NPTEL JAVA'.


Program:-

public class Question215{ 

    public static void main(String[] args) {

 //Declare variable with name 'nptel', 'space' and 'java' and proper datatype

    String nptel, space, java;


  //Initialize the variables with proper input

    nptel = "NPTEL";

    space = " ";

    java = "JAVA";

System.out.print(nptel+space+java);

   }

}



InputOutput
Test Case 1
NPTEL JAVA

1 comment: