Reorganize repository
This commit is contained in:
14
Test Project/pom.xml
Normal file
14
Test Project/pom.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.mycompany</groupId>
|
||||
<artifactId>mavenproject1</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<exec.mainClass>com.mycompany.mavenproject1.Mavenproject1</exec.mainClass>
|
||||
</properties>
|
||||
</project>
|
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.mycompany.mavenproject1;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
public class ByteOverFlow {
|
||||
public static void main(String[] args)
|
||||
{
|
||||
byte b = 127;
|
||||
b++;
|
||||
System.out.println(b);
|
||||
}
|
||||
}
|
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.mycompany.mavenproject1;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
public class LogicalExpression {
|
||||
|
||||
public static void main(String[] args) {
|
||||
int x = -10;
|
||||
boolean hasCycled = false;
|
||||
while (true) {
|
||||
//System.out.print(((x > 1) || ( x < 100) ) && (x < 0)); //incorrect
|
||||
System.out.print("Logical Expression result: ");
|
||||
System.out.print(x < 100 && x > 1 || (x < 0)); //correct
|
||||
System.out.print(": " + x);
|
||||
|
||||
if (x >= 150 & hasCycled == false) {
|
||||
hasCycled = true;
|
||||
} else if (x <= -10) {
|
||||
hasCycled = false;
|
||||
}
|
||||
|
||||
if (hasCycled) {
|
||||
System.out.println(" state: currently subtracting 1");
|
||||
x--;
|
||||
} else {
|
||||
System.out.println(" state: currently adding 1");
|
||||
x++;
|
||||
}
|
||||
|
||||
try {
|
||||
TimeUnit.MILLISECONDS.sleep(250); //waits for a specified amount of time
|
||||
} catch (Exception e) {
|
||||
System.out.print("lol");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.mycompany.mavenproject1;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
public class LulyBoolean {
|
||||
public static void main(String[] args)
|
||||
{
|
||||
boolean even = false;
|
||||
System.out.println((even ? true : false));
|
||||
System.out.println(even);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Project/Maven2/JavaApp/src/main/java/${packagePath}/${mainClassName}.java to edit this template
|
||||
*/
|
||||
package com.mycompany.mavenproject1;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
public class Mavenproject1 {
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
int x = 10;
|
||||
int y = 1;
|
||||
|
||||
System.out.println(x ^ y); // result is 11
|
||||
System.out.println(x & y); //result is 0
|
||||
System.out.println(x | y); // result is 11
|
||||
System.out.println(0 ^ 1); // result is 1
|
||||
System.out.println(1 ^ 1); // result is 0
|
||||
System.out.println(0 ^ 0); // result is 11 (Wrong Markou, Wrong)
|
||||
}
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.mycompany.mavenproject1;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
public class NotDemo {
|
||||
public static void main(String[] args)
|
||||
{
|
||||
System.out.println(!true);
|
||||
}
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.mycompany.mavenproject1;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
public class PrePostIncrement {
|
||||
public static void main(String[] args)
|
||||
{
|
||||
int j = 2;
|
||||
int i = j++ + j * j + 1;
|
||||
|
||||
System.out.println("i is: " + i);
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.mycompany.mavenproject1;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
public class TypeCasting {
|
||||
public static void main(String[] args)
|
||||
{
|
||||
double b = 5.3;
|
||||
int c = (int) b;
|
||||
double d = ((double) 1 / 2);
|
||||
|
||||
System.out.println(b);
|
||||
System.out.println(c);
|
||||
System.out.println(d);
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5
Test Project/target/maven-archiver/pom.properties
Normal file
5
Test Project/target/maven-archiver/pom.properties
Normal file
@@ -0,0 +1,5 @@
|
||||
#Generated by Maven
|
||||
#Tue Sep 27 12:01:14 CDT 2022
|
||||
artifactId=mavenproject1
|
||||
groupId=com.mycompany
|
||||
version=1.0-SNAPSHOT
|
@@ -0,0 +1,2 @@
|
||||
com/mycompany/mavenproject1/ByteOverFlow.class
|
||||
com/mycompany/mavenproject1/Mavenproject1.class
|
@@ -0,0 +1,5 @@
|
||||
/home/caleb/NetBeansProjects/ADSV Java/mavenproject1/src/main/java/com/mycompany/mavenproject1/LogicalExpression.java
|
||||
/home/caleb/NetBeansProjects/ADSV Java/mavenproject1/src/main/java/com/mycompany/mavenproject1/ByteOverFlow.java
|
||||
/home/caleb/NetBeansProjects/ADSV Java/mavenproject1/src/main/java/com/mycompany/mavenproject1/PrePostIncrement.java
|
||||
/home/caleb/NetBeansProjects/ADSV Java/mavenproject1/src/main/java/com/mycompany/mavenproject1/Mavenproject1.java
|
||||
/home/caleb/NetBeansProjects/ADSV Java/mavenproject1/src/main/java/com/mycompany/mavenproject1/NotDemo.java
|
BIN
Test Project/target/mavenproject1-1.0-SNAPSHOT.jar
Normal file
BIN
Test Project/target/mavenproject1-1.0-SNAPSHOT.jar
Normal file
Binary file not shown.
Reference in New Issue
Block a user