0 votes
in JAVA by

public class Main{
  public static void main(String [] args){
    String name=”WelcomeJava”;
     Runnable r1=() -> System.out.println(name);
    String name1 = name.toUpperCase();
    Runnable r2=() -> System.out.println(name1);
     r1.run();
  }
}
What is the output of the above program?

       A. WELCOMEJAVA

       B. WelcomeJava

       C. Runtime error

       D. Compilation error

1 Answer

0 votes
by

Correct answer is WelcomeJava

Related questions

0 votes
asked Aug 21, 2022 in JAVA by sharadyadav1986
0 votes
asked May 22, 2022 in JAVA by AdilsonLima
...