+2 votes
in JAVA by

public class App{

  public static void main(String [] args){

    String name="WelcomeJava";

    Runnable r1=() -> System.out.println(name);

    String name1="";

    name1=name.toUpperCase();

    Runnable r2=() -> System.out.println(name1);

    r1.run();

  }

What is the output of the above program?

Runtime error

Compilation error

WelcomeJava

WELCOMEJAVA

...