blah
This commit is contained in:
parent
c884acd6e2
commit
05f4c98fbe
22
src/main/java/tech/nevets/STFileWriter.java
Normal file
22
src/main/java/tech/nevets/STFileWriter.java
Normal file
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
18
src/main/java/tech/nevets/STMethods.java
Normal file
18
src/main/java/tech/nevets/STMethods.java
Normal file
@ -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.");
|
||||||
|
}
|
||||||
|
}
|
11
src/main/java/tech/nevets/STRandomizer.java
Normal file
11
src/main/java/tech/nevets/STRandomizer.java
Normal file
@ -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();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user