Question: 6. Consider below code interface Knife { default int compare(int i1, int i2) { return i1 - i2; } static void run() { System.out.println(Running !);

6. Consider below code interface Knife \{ default int compare(int i1, int i2) { return i1 - i2; } static void run() { System.out.println("Running !"); } String welcomify(String name); \} choose the following code that compiles [4)(1 Point) Knife sni =() ) > System.out.print("Running fast !"); Knife sni =(a)> "Welcome, " + a; Knife sni =( int a, int b)>ab; Knife interface will not compile. 7. How do we call a variable that is a member of a class? (answer in 1 word, small letters) (1 Point) 8. What is the keyword we use to define constant/ readonly variable in Java? (answer in 1 word, small letters) (1 Point)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
