This file contains 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
import java.util.ConcurrentModificationException; | |
import java.util.ArrayList; | |
public class CMETest { | |
public static void main (String[] args) { | |
ArrayList<Integer> numbers = new ArrayList<>(); | |
int qty = Integer.MAX_VALUE/20; | |
for (int i=0; i<qty; i++) { | |
numbers.add(i); | |
} | |
This file contains 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
public class VarAnonInner { | |
public static void main (String[] args) throws Exception { | |
var anonInner = new Anon() { | |
public void hello() { | |
System.out.println("New method here, and you can easily access me in Java 10!\n" + | |
"The class is: " + this.getClass() | |
); | |
}; | |
}; | |
anonInner.hello(); |
This file contains 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
public class ExceptionBlurb { | |
public static void main (String [] args) { | |
final Car adriansLemon = new Car("alt", 9.0, "turn key", 1, true, 2); | |
final Car dansCRV = new Car("good alternator", 9, "PTS", 912, false, 5); | |
try { | |
dansCRV.start(); | |
} catch (AlternatorFailureException afe) { | |
System.out.println(afe); | |
} catch (NoEngineOilException neo) { |
This file contains 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
import javafx.stage.Stage; | |
import javafx.scene.Scene; | |
import javafx.application.Application; | |
import javafx.scene.control.*; | |
import javafx.scene.layout.VBox; | |
import javafx.scene.input.KeyCode; | |
import javafx.geometry.Insets; | |
public class FXTestCB extends Application { | |
public static void main (String[] args) { launch(args); } |
This file contains 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
import java.io.*; | |
import java.net.URL; | |
import java.nio.file.*; | |
import javafx.application.Application; | |
import javafx.stage.Stage; | |
import javafx.scene.Scene; | |
import javafx.scene.layout.HBox; | |
import javafx.scene.control.Button; |
This file contains 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
{ properties -> | |
defineProperty("WINDOWS_VS_VSINSTALLDIR", properties, "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community"); | |
defineProperty("WINDOWS_VS_WINSDKDLLINSTALLDIR", properties, "C:/Program Files (x86)/Windows Kits/10/Redist/10.0.17763.0/ucrt/DLLs"); | |
defineProperty("WINDOWS_SDK_DIR", properties, System.getenv().get("WINSDK_DIR")) | |
defineProperty("WINDOWS_SDK_VERSION", properties, "") | |
defineProperty("WINDOWS_VS_VCINSTALLDIR", properties, "$WINDOWS_VS_VSINSTALLDIR/VC") | |
defineProperty("WINDOWS_VS_DEVENVDIR", properties, "$WINDOWS_VS_VSINSTALLDIR/Common7/IDE") | |
defineProperty("WINDOWS_VS_DEVENVCMD", properties, "$WINDOWS_VS_DEVENVDIR/devenv.exe") | |
defineProperty("WINDOWS_VS_MSVCDIR", properties, WINDOWS_VS_VCINSTALLDIR) | |
defineProperty("WINDOWS_DXSDK_DIR", properties, System.getenv().get("DXSDK_DIR")) |
This file contains 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
/* | |
Copyright (C) 2018 Adrian D. Finlay. All rights reserved. | |
Licensed under the MIT License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
https://opensource.org/licenses/MIT | |
Permission is hereby granted, free of charge, to any person obtaining a copy |
This file contains 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
/* | |
Copyright (C) 2018 Adrian D. Finlay. All rights reserved. | |
Licensed under the MIT License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
https://opensource.org/licenses/MIT | |
Permission is hereby granted, free of charge, to any person obtaining a copy |
This file contains 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
import java.io.File; | |
import java.net.URI; | |
import java.util.Scanner; | |
import java.time.Duration; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.nio.file.Files; | |
import java.io.InputStream; | |
import java.io.FileOutputStream; | |
import java.net.Authenticator; |
This file contains 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
:: This Script automates the creating of our project directories. | |
@ECHO OFF | |
ECHO "Creating platform independent directories...." | |
MD src/main/java | |
MD src/main/resources | |
ECHO "Creating directories for Android...." | |
MD src/android/java | |
MD src/android/resources |
NewerOlder