Question: In the Java programming language, static keyword can be used with block, variable, method and nested classes. In the following Java code as shown
In the Java programming language, static keyword can be used with block, variable, method and nested classes. In the following Java code as shown in Figure 3, there are TWO (2) errors. Identify the errors and use the static keyword to solve the errors. class Student { } String name; static String college = "ITS"; static void change () { college "KDU"; name = "Fatimah"; display(); void display () { System.out.println (name+" "+college); Figure 3. Erroneous Java Code [2 marks]
Step by Step Solution
There are 3 Steps involved in it
I see the image you provided contains a snippet of Java code with two errors Let me identify the errors and explain how to correct them First error In ... View full answer
Get step-by-step solutions from verified subject matter experts
