What changes will lead to a successful compilation of the following code? Select all that apply.

public class LocalVsInstance {    
    String s;
    
    public static void main(String[] args) {
        String s;
        System.out.println(s.toUpperCase());
        LocalVsInstance localVsInstance = new  LocalVsInstance();
        System.out.println(localVsInstance.s.toUpperCase());
    }

}
Java
Java Quiz
Start Quiz

or Read more about Java Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback