public class Solution {
public int intVar;
public double doubleVar;
public Double DoubleVar;
public boolean booleanVar;
public Object ObjectVar;
public Exception ExceptionVar;
public String StringVar;
public static void main(String[] args) {
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);
}
}
package com.codegym.task.task15.task1516;
/*
Default values
Requirements:
1. The Solution class must define an int field intVar.
2. The Solution class must define a double field doubleVar.
3. The Solution class must define a Double field DoubleVar.
4. The Solution class must define a boolean field booleanVar.
5. The Solution class must define an Object field ObjectVar.
6. The Solution class must define an Exception field ExceptionVar.
7. The Solution class must define a String field StringVar.
8. The main method should display the field values on the screen
(each on a new line or separated by a space) in the specified order. You don't need to initialize variables.
*/
public class Solution {
static int intVar;
static double doubleVar;
static Double DoubleVar;
static boolean booleanVar;
static Object ObjectVar;
static Exception ExceptionVar;
static String StringVar;
public static void main(String[] args) {
System.out.println(Solution.intVar);
System.out.println(Solution.doubleVar);
System.out.println(Solution.DoubleVar);
System.out.println(Solution.booleanVar);
System.out.println(Solution.ObjectVar);
System.out.println(Solution.ExceptionVar);
System.out.println(Solution.StringVar);
}
}