MP3_REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
This commit is contained in:
14
Semester 2/TestProject/pom.xml
Normal file
14
Semester 2/TestProject/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.calebfontenot</groupId>
|
||||
<artifactId>TestProject</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.calebfontenot.testproject.TestProject</exec.mainClass>
|
||||
</properties>
|
||||
</project>
|
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* 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.calebfontenot.testproject;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
public class StringBuilderTest {
|
||||
public static void main(String[] args)
|
||||
{
|
||||
StringBuilder string = new StringBuilder("abcdefghijklmnopqrstuvwxyz");
|
||||
System.out.println(string.length());
|
||||
System.out.println(string);
|
||||
string.append("Java");
|
||||
System.out.println(string);
|
||||
string.insert(26, "INSERT");
|
||||
System.out.println(string);
|
||||
string.append(true);
|
||||
System.out.println(string);
|
||||
}
|
||||
}
|
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
*/
|
||||
package com.calebfontenot.testproject;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
public class TestProject {
|
||||
|
||||
public static void foo1(int x)
|
||||
{
|
||||
System.out.println(x);
|
||||
}
|
||||
|
||||
public static Integer foo2()
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
public static Integer foo3()
|
||||
{
|
||||
return new Integer("10");
|
||||
}
|
||||
|
||||
/**
|
||||
* public static void main(String[] args) { Integer i = new Integer(4); Integer j = 4; Integer k = new Integer(555); int intInt = Integer.parseInt("76000000");
|
||||
*
|
||||
* System.out.println(Integer.MAX_VALUE); foo1(123); System.out.println(foo2().getClass().getName()); System.out.println(foo3()); }
|
||||
*
|
||||
*/
|
||||
public static void printBigInteger(BigInteger[] arr)
|
||||
{
|
||||
for (BigInteger i = BigInteger.ZERO;
|
||||
i.compareTo(new BigInteger(Integer.toString(arr.length))
|
||||
) < 0;
|
||||
i = i.add(BigInteger.ONE)) {
|
||||
System.out.println(arr[i.intValue()]);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
BigInteger[] arr = new BigInteger[3];
|
||||
arr[0] = BigInteger.ONE;
|
||||
arr[1] = new BigInteger("123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789");
|
||||
arr[2] = new BigInteger("88");
|
||||
printBigInteger(arr);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user