New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching language of Java
// jan aufgabe 1
// version 1
 
void drehUm() {
    linksUm();
    linksUm();    
}
 
void rechtsUm() {
    drehUm();
by JanL   Today @ 3:31pm
Tags:
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;
by nts   Today @ 6:58am
Tags:
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) {
    
by None of your fucking business   Yesterday @ 5:50am
Tags:
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);
Wednesday @ 3:04pm
Tags:
9 Views
no comments
 
 
public class square {
    private double width;
    private double length;
    
    public square() {
        this.length = 10;
        this.width = 10;
    } 
Wednesday @ 2:32pm
Tags:
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;
   }
Wednesday @ 2:09pm
Tags:
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;}
Wednesday @ 1:54pm
Tags:
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 ;
Tuesday @ 3:35pm
Tags:
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;
Tuesday @ 2:59pm
Tags:
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; 
 
Tuesday @ 1:35pm
Tags:
7 Views
no comments
 
codepaste.net
Monday @ 8:55am
Tags:
5 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--)
Sunday @ 9:23pm
Tags:
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--)
  {
Sunday @ 9:16pm
Tags:
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("@");
Sunday @ 9:12pm
Tags:
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) {
Sunday @ 4:27am
Tags:
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(); 
March 11, 2010 @ 7:34am
Tags:
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
by ludjer   March 10, 2010 @ 3:39pm
Tags:
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;
by ludjer   March 10, 2010 @ 3:38pm
Tags:
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);
March 10, 2010 @ 12:28pm
Tags:
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(); 
March 09, 2010 @ 5:50am
Tags:
12 Views
no comments
 
/* Parvulescu Cosmin
   Grupa 202
   cerc.java */
 
package Mostenire_Cerc_Cilindru;
 
public class cerc {
    double raza;
 
    cerc()                      { raza = 0; }
by Parvulescu Cosmin   March 05, 2010 @ 5:36pm
Tags:
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;
by Parvulescu Cosmin   March 05, 2010 @ 5:34pm
Tags:
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;
        
March 02, 2010 @ 7:17am
Tags:
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])
      {
March 02, 2010 @ 6:30am
Tags:
15 Views
no comments
 
import java.util.*; 
public class Program1
{ 
 
public static void main (String []arg) 
{ 
    Random gen=new Random(); 
    
    int sum=0;
    double average;
March 02, 2010 @ 5:49am
Tags:
14 Views
no comments
 
brought to you by:
West Wind Techologies


If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate