I tried to show the fileds from main directly, but due to the fact that fields are not allowed to be static (even if the requirement does not say this - but validation gives an error then) I cant manage. So I printed them all in the constructor... Works, but is not accepted. So how to solve this? (Even showing all the values in one line with blank in between does not help)
package de.codegym.task.task15.task1516;
/*
Standardwerte
*/
public class Solution {
public int intVar;
public double doubleVar;
public Double DoubleVar;
public boolean booleanVar;
public Object ObjectVar;
public Exception ExceptionVar;
public String StringVar;
Solution(){
System.out.println(intVar);
System.out.println(doubleVar);
System.out.println(DoubleVar);
System.out.println(booleanVar);
System.out.println(ObjectVar);
System.out.println(ExceptionVar);
System.out.println(StringVar);
}
public static void main(String[] args) {
new Solution();
}
}