My issue
i am not able to solve this problem
My code
/* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
public static String greet(String name) {
return "Hello, " + name + "!";
}
// Function to capitalize a text
public static String capitalize(String name) {
return "HELLO,"+ name.toUpperCase()+ "!";
}
// Function to greet and capitalize a name
public static String greetAndCapitalize(String name) {
//update the code here
return "HELLO,"+ name.toUpperCase()+ "!";
}
public static void main (String[] args) throws java.lang.Exception
{ String name = "Alice";
String finalResult = greetAndCapitalize(name);
// Display the results
System.out.println("Greeting: Hello,Alice!");
System.out.println("Capitalized Greeting: HELLO,ALICE!");
System.out.println("Final Result: HELLO,ALICE!");
}
}
Learning course: Placement preparation using Java
Problem Link: CodeChef: Practical coding for everyone