BAEL-4193 (updated files)
- removed not needed fields
This commit is contained in:
parent
4c4cafde1e
commit
ea9c64147b
@ -1,20 +1,11 @@
|
||||
package com.baeldung.exceptions.nosuchmethoderror;
|
||||
|
||||
import java.util.StringJoiner;
|
||||
|
||||
public class MainMenu {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Today's Specials: " + getSpecials());
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Today's Specials: " + getSpecials());
|
||||
}
|
||||
|
||||
public static StringJoiner getSpecials() {
|
||||
StringJoiner specials = new StringJoiner(", ");
|
||||
try {
|
||||
specials.add(SpecialToday.getStarter());
|
||||
specials.add(SpecialToday.getDesert());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return specials;
|
||||
}
|
||||
public static String getSpecials() {
|
||||
return SpecialToday.getDesert();
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,8 @@
|
||||
package com.baeldung.exceptions.nosuchmethoderror;
|
||||
|
||||
public class SpecialToday {
|
||||
private static String desert = "Chocolate Cake";
|
||||
private static String starter = "Caesar Salad";
|
||||
private static String desert = "Chocolate Cake";
|
||||
|
||||
public static String getDesert() {
|
||||
return desert;
|
||||
}
|
||||
|
||||
public static String getStarter() {
|
||||
return starter;
|
||||
}
|
||||
public static String getDesert() {
|
||||
return desert;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user