Format:
Recent snippets matching language of Java
// jan aufgabe 1 // version 1 void drehUm() { linksUm(); linksUm(); } void rechtsUm() { drehUm();
5 Views
no comments
// Bens Uebungsaufgaben - Hamster (Java) // Aufgabe 2 - Blatt 2 // Aufgabenloesung v.0.8.15 // copyright: nts // created: 20/03/2010 void main() { int anzkoerner = 0;
6 Views
no comments
____________________________file one save as megafag.java__________________ import javax.swing.*; import java.awt.*; public class megafag { public static void main(String[] args) {
5 Views
no comments
public class program { /** * @param args */ public static void main(String[] args) { square s1 = new square(); square s2 = new square(12,10);
9 Views
no comments
public class square { private double width; private double length; public square() { this.length = 10; this.width = 10; }
7 Views
no comments
public square(double width, double length){ if (width < 0 ){ System.out.print("please enter a valid width"); this.width = 0; } if (length < 0) { System.out.print("please enter a valid length"); this.length = 0; }
8 Views
no comments
ublic class squert { private double width; private double length; public squert(double width, double length) { length = 10; width = 10; } public double getWidth() {return width;}
8 Views
no comments
import java.util.*; public class degree { public static void main (String[]args) { double radians, degrees=0; while (degrees<=360) { radians = (degrees * Math.PI)/180.0 ;
7 Views
no comments
import java.util.*; public class tezt { public static void main (String[] args) { Random generator = new Random(); int tal1 = generator.nextInt(6) + 1, tal2 = generator.nextInt(6) + 1, tal3 = generator.nextInt(6) + 1, counter = 0; while(tal1 != tal2 && tal1 != tal3){ tal1 = generator.nextInt(6) + 1;
7 Views
no comments
// **************************************************************** // Sales.java // // Reads in and stores sales for each of 5 salespeople. Displays // sales entered by salesperson id and total sales for all salespeople. // // **************************************************************** import java.util.Scanner;
7 Views
no comments
int p_i = 2; int p_j = 2; int p_k = 3; int iLimit = 1; int jLimit = 1; int kLimit = 1; int denominator = 2; for (int i=p_i;i>iLimit;i--) for (int j=p_j;j>=jLimit;j--)
9 Views
no comments
int p_i = 4; int p_j = 4; int iLimit = 2; int jLimit = 3; int denominator = 3; for (int i=p_i; i>=iLimit; i--) { for (int j=p_j; j>=jLimit; j--) {
7 Views
no comments
int p_i = 4; int p_j = 4; int iLimit = 2; int jLimit = 3; int denominator = 3; for (int i=p_i;i>=iLimit;i--) for (int j=p_j;j>=jLimit;j--) if (((i+j) % denominator == 0)) System.out.print("@");
7 Views
no comments
package ProgrammierWE; public class birthdaycalender { public static void main(String[] args) { String[][] birthday = new String[10][2]; auswahl(birthday); } static void auswahl(String[][] birthday) {
7 Views
no comments
import java.io.*; public class DecList { public static void main(String[]args) { FileOutputStream p; File AudioFile = new File( "k523jsyt2idjh.d03" ); long length = AudioFile.length();
9 Views
no comments
import javax.swing.JApplet; import java.awt.Graphics; /** * This class extends applet and creates a new instance of FrameGUI * @author Darren */ public class GUIApplet extends JApplet { /** * initiates the applet
6 Views
no comments
//imports import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JPanel; import javax.swing.JButton; import java.awt.Color;
7 Views
no comments
@Override public void postVisit(Contract node) { // check if we already processed this node if (!mVisitedNodes.containsKey(node)) { IntermediateNode tmpNode = null; if (node instanceof DataSourceContract<?, ?>) { tmpNode = new IntermediateNode(IntermediateNode.OperationType.DataSource, (Contract) node);
9 Views
no comments
import java.io.*; public class DecList { public static void main(String[]args) { FileOutputStream p; File AudioFile = new File( "k523jsyt2idjh.d03" ); long length = AudioFile.length();
12 Views
no comments
/* Parvulescu Cosmin Grupa 202 cerc.java */ package Mostenire_Cerc_Cilindru; public class cerc { double raza; cerc() { raza = 0; }
9 Views
no comments
/* Parvulescu Cosmin Grupa 202 carte.java */ package Mostenire_Carte_Manual; public class carte { private String titlu; private String autor; private String editura;
13 Views
no comments
import java.util.*; public class Chryptoscience { public static void main(String[] args) { Scanner input=new Scanner (System.in); String msg=input.nextLine(); String encmsg=""; char [] msgArray;
13 Views
no comments
//String to Array: msgArray = msg.toCharArray(); //Prints MsgArray: for(int i=0;i<msgArray.length;i++) { for(int c=0;c<characterArray.length;c++) { if(msgArray[i]==characterArray[c]) {
15 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
