[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
ITT: /g/ writes a program in Java
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 26
Thread images: 1
File: mm.png (3 KB, 378x240) Image search: [Google]
mm.png
3 KB, 378x240
https://codeshare.io/eMXcn
>>
so far so good
>>
public class Main {
public static void main(String[] args) {


// >java
// curry/10
//install gentoo
char[] cs = {'i', 'n', 's', 't', 'a', 'l', 'l', ' ', 'g', 'e', 'n', 't', 'o', 'o'};
System.out.println(Arrays.toString(cs));

if(!System.getProperty("os.name").contains("Gentoo")){
System.err.println("This program does not run on botnets");
new Exception("your OS is easy to use").printStackTrace();
System.exit(1);
}else{
System.out.println("I’d just like to interject for moment. What you’re refering to as Linux, is in fact, GNU/Linux, or as I’ve recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.");
}

System.out.println("cum");

System.out.println(">java");

System.out.println("leddit xDDDD");

System.out.println("curry/10");

String s = "op is a faggot";
for(int i = 0; i < s.length(); i++)
{
System.out.print(s.charAt(i));
}


//cancer
System.out.println("1");
System.out.println("2");
System.out.println("fizz");
System.out.println("4");
System.out.println("buzz");
System.out.println("fizz");
//t

//topkek
String ayy = "lmao"; // ;)
while (ayy.equals("lmao"))
{
System.out.println("leddit xDDDD");
}
}
}
>>
boolean opIsAFaggot = true;
>>
// this is some good shit if i do say so myself
>>
bampin cause this is fun
>>
This got shitty really fucking quick
>>
it's going to shit
>>
REALTIME SHITPOSTING
what a time to be online
>>
>>53757975
Here's an array helper class i made, It's got some pretty useful functions.

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
*
* @author /g/
*/
public class arraySearch {

public static ArrayList AL;
public static List<String> myList = new ArrayList<>();
public static List<Integer> iList = new ArrayList<>();

public static boolean findInStringArray(String s, String a[]) {
int i;
for (i=0; i < a.length; i++) {
if (s.equals(a[i])) {
return true;
}
}
return false;
}

public static String[] removeFromStringArray(String s, String a[]) {
int i;
Collections.addAll(myList, a);
for (i=0; i < a.length; i++) {
if (s.equals(a[i])) {
myList.remove(a[i]);
a = myList.toArray(new String[myList.size()]);
}
}
return a;
}

public static boolean findInIntArray(int n, int a[]) {
int i;
for (i=0; i < a.length; i++) {
if (n == a[i]) {
return true;
}
}
return false;
}
>>
>>53757975
if only /g/ wasn't infested by /v/ermin who are too pleb even for pajava who constantly want to delete the whole thing
>>
<?php

<!DICKTYPE small> //kek //toplel
<html>
<head>
<title>Ayy lmao</title>
</head>
<body>
<p>kjej</p>
</body>
</html>
?>

<!DOCTYPE html>
<html>
<head>
<title>FUCK</title> <!--hey guys look at this little faggot in the corner writing HTML what a hacker he probably uses Gentoo-->
</head>
<body>
<h1>fuck off will ya?</h1> <!--oh my god anon are you a hacker? of course i am :^) hack me :^) IP 10.0.0.1 HACKED :^)-->
</body> <!-- learn how to comment fags -->
</html>
>>
package org.gay.cancer.rendering;

import org.lwjgl.opengl.GL;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL30;

public class GLRendering {
public static void clean(){
clearScreen();
}
static GLColor c;
public static void initGL() throws IllegalStateException, GLException{
GL.createCapabilities();
if(!isOnSupportedGLPlatform()){
IllegalStateException ise = new IllegalStateException("WEGLInitProblem: Engine can not initialize on a Macintosh OS/OSX platform.");
throw ise;
}
GL11.glMatrixMode(GL11.GL_PROJECTION);

GL11.glFrontFace(GL11.GL_CW);
GL11.glCullFace(GL11.GL_BACK);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_DEPTH_TEST);

GL11.glEnable(GL30.GL_FRAMEBUFFER_SRGB);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
c = new GLColor(0f,0f,0f);
GL11.glClearColor(c.r, c.g, c.b, c.a);
}
public static void setScanColor(GLColor c){
GL11.glClearColor(c.r, c.g, c.b, c.a);
GLRendering.c = c;
}
public static boolean isOnSupportedGLPlatform() throws GLException{
System.out.println("GLVersion: " + GL11.glGetString(GL11.GL_VERSION));
System.out.println("OperatingSystem: " + System.getProperty("os.name"));
if(!GL11.glGetString(GL11.GL_VERSION).contains("NVIDIA")){
System.out.println("WARNING: The game was only tested on a NVIDIA graphics unit. It may not work correctly on other graphical units.");
}
if(!System.getProperty("os.name").contains("Windows")){
System.out.println("WARNING: This game was only tested on Windows 7. It may not work correctly on other operating systems, especially Mac OS/OSX and Linux.");
}
if(System.getProperty("os.name").contains("Mac")){
return false;
}else if(GL11.glGetString(GL11.GL_VERSION).contains("4.5")){
return true;
}else{
throw new GLException("OpenGL version is TOO OLD. You must have OpenGL 4.4 to run this engine!");
}

}

}
>>
>>53758417
import org.lwjgl.opengl.GL20;

public class GLException extends Exception {

private static final long serialVersionUID = 7795880252813004676L;

public GLException(String string) {
super(string);
}

@Override
public void printStackTrace(){
try {
Thread.sleep(10);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.err.println("=====================");
System.err.println("GLException has been thrown. Printing system information...");
System.err.println("Operating System: " + System.getProperty("os.name"));
System.err.println("GL Version: " + GL11.glGetString(GL11.GL_VERSION));
System.err.println("GL Vendor: " + GL11.glGetString(GL11.GL_VENDOR));
System.err.println("GL Renderer: " + GL11.glGetString(GL11.GL_RENDERER));
System.err.println("GL Shading language version: " + GL11.glGetString(GL20.GL_SHADING_LANGUAGE_VERSION));
System.err.println("GL Extensions: " + GL11.glGetString(GL11.GL_EXTENSIONS));
System.err.println("The version of OpenGL you are using is probably too old or you just need to update your graphics drivers.");
System.err.println("If updating drivers doesn't work, try running this on a new piece of hardware (late 2015 or newer).");
System.err.println("=====================");
super.printStackTrace();
}
}
>>
>>53757975
>being this retarded

enjoy you penis and deletes
>>
rip
>>
doing pretty good again
>>
bunp
>>
>>53757975
There's always an autistic that ruins everything.
>>
>>53757975
Ok carnage
>>
>>53757975
bump
>>
how does this work?
>>
and its all gone. We had a good Gorilla class going
>>
new Meme().eatDicks(Integer.MAX_INT_VALUE);
>>
>>53758134
> good shit go౦ԁ sHit thats some goodshit rightthere rightthere if i do ƽaү so my self i say so thats what im talking about right there right there (chorus: ʳᶦᵍʰᵗ ᵗʰᵉʳᵉ) mMMMMᎷM HO0OଠOOOOOOଠଠOoooᵒᵒᵒᵒᵒᵒᵒᵒᵒ Good shitsauce me the FUCK up cheesy shit cheesy sHit thats some cheesyshit rightth ere rightthere if i do ƽaү so my self i say so thats what im talking about right there right there (chorus: ʳᶦᵍʰᵗ ᵗʰᵉʳᵉ) mMMMMᎷM HO0OଠOOOOOOଠଠOoooᵒᵒᵒᵒᵒᵒᵒᵒᵒ Cheesy shit euphoric logic !euphoric loGic thats some euphoric logic rightthere Carl Saganif i do ƽaү so gentlemen i say so thats euPhoric logic right there Richard Dawkins (chorus: socrates died for this shit) mMMMMᎷM HO0OଠOOOOOOଠଠOoooᵒᵒᵒᵒᵒᵒᵒᵒᵒ euphoric logic slam me the FUCK uP john cena JOhN cEna john cena johncena johncena johncena u can't see me if I do ƽaү so my self i say so thats what im talking about right there right there (chorus: ʳᶦᵍʰᵗ ᵗʰᵉʳᵉ) mMMMMᎷM HO0OଠOOOOOOଠଠOoooᵒᵒᵒᵒᵒᵒᵒᵒᵒ John ceNa POTENTIALLY sign me the FUCK up average shit modera̷̶te sHit thats some ALright shit right th ere
>>
>>53760055
Why did I laugh at this?
Thread replies: 26
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.