diff --git a/src/main/java/tech/nevets/STFileWriter.java b/src/main/java/tech/nevets/STFileWriter.java new file mode 100644 index 0000000..e601044 --- /dev/null +++ b/src/main/java/tech/nevets/STFileWriter.java @@ -0,0 +1,22 @@ +package tech.nevets; + +import java.io.File; +import java.io.IOException; + +public class STFileWriter { + public static void main(String[] args) { + String user = "stracey.intern"; + String fileLocation1 = "C:\\Users\\" + user + "\\Desktop\\back-slash.txt"; + String fileLocation2 = "C:/Users/" + user + "/Desktop/forward-slash.txt"; + + File file1 = new File(fileLocation1); + File file2 = new File(fileLocation2); + + try { + file1.createNewFile(); + file2.createNewFile(); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/tech/nevets/STMethods.java b/src/main/java/tech/nevets/STMethods.java new file mode 100644 index 0000000..eb1818e --- /dev/null +++ b/src/main/java/tech/nevets/STMethods.java @@ -0,0 +1,18 @@ +package tech.nevets; + +public class STMethods { + public static void main(String[] args) { + System.out.println("Hello from the main method."); + + displayMessage(); + + System.out.println("Back in the main method"); + } + + /** + * The {@link STMethods#displayMessage()} method displays a greeting. + */ + public static void displayMessage() { + System.out.println("Hello from the displayMessage method."); + } +} diff --git a/src/main/java/tech/nevets/STRandomizer.java b/src/main/java/tech/nevets/STRandomizer.java new file mode 100644 index 0000000..0b73c8b --- /dev/null +++ b/src/main/java/tech/nevets/STRandomizer.java @@ -0,0 +1,11 @@ +package tech.nevets; + +import java.util.Random; +import java.util.concurrent.ThreadLocalRandom; + +public class STRandomizer { + public static void main(String[] args) { + Random rand = ThreadLocalRandom.current(); + rand.nextInt(); + } +}