Last active
December 20, 2015 20:49
-
-
Save markstein/6193402 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package de.mosst.spielwiese.no_class_def_found_error; | |
| import java.util.logging.Logger; | |
| @SuppressWarnings("unused") | |
| public class Tester { | |
| public static void main(String[] args) { | |
| System.out.println("Start with INSTANCE"); | |
| try { | |
| SingeltonClass_with_INSTANCE_as_field objectAleph = SingeltonClass_with_INSTANCE_as_field.INSTANCE; | |
| } catch (Throwable e) { | |
| System.out.println("The first initialization was wrong with this ErrorMessage: "); | |
| e.printStackTrace(); | |
| } | |
| try { | |
| System.out.println("\nThe error message by every next acces:"); | |
| SingeltonClass_with_INSTANCE_as_field objectBeth = SingeltonClass_with_INSTANCE_as_field.INSTANCE; | |
| } catch (Throwable e) { | |
| System.out.println("The first initialization was wrong with this ErrorMessage: "); | |
| e.printStackTrace(); | |
| } | |
| System.out.println("\n\n\nStart with getInstance()"); | |
| try { | |
| SingeltonClass_with_getInstanceO_Method objectGimel = SingeltonClass_with_getInstanceO_Method.getInstance(); | |
| } catch (Throwable e) { | |
| System.out.println("The first initialization was wrong with this ErrorMessage: "); | |
| e.printStackTrace(); | |
| System.out.println("~~~~~~~~~~~~~~~~~~~~~~"); | |
| } | |
| try { | |
| SingeltonClass_with_getInstanceO_Method objectDaleth = SingeltonClass_with_getInstanceO_Method.getInstance(); | |
| } catch (Throwable e) { | |
| System.out.println("\nThe first initialization was wrong with this ErrorMessage: "); | |
| e.printStackTrace(); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment