This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main{ | |
public static void main( String [] args ) { | |
int[] a = {5, 9, 7}; | |
for(int el: a){ | |
System.out.println(el); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Calendar; | |
import java.util.GregorianCalendar; | |
public class Main{ | |
public static void main( String [] args ) { | |
GregorianCalendar kk = new GregorianCalendar(); | |
//int br = kk.get(Calendar.YEAR); | |
System.out.println("YEAR: " + kk.get(Calendar.YEAR)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.eclipse.swt.SWT; | |
import org.eclipse.swt.widgets.Button; | |
import org.eclipse.swt.widgets.Display; | |
import org.eclipse.swt.widgets.Event; | |
import org.eclipse.swt.widgets.Label; | |
import org.eclipse.swt.widgets.Listener; | |
import org.eclipse.swt.widgets.Shell; | |
import org.eclipse.swt.widgets.Text; | |
public class NN { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class SumResult { | |
private String name; | |
private double salary; | |
private Date hireDay; | |
public SumResult(String n, double s, int year, int month, int day){ | |
name = n; | |
salary = s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestSumResult { | |
public static void main(String[] args) { | |
SumResult[] staff = new SumResult[3]; | |
staff[0] = new SumResult("Carl", 75000, 1987, 12, 15); | |
staff[1] = new SumResult("Harry", 5000, 1989, 9, 13); | |
staff[2] = new SumResult("Tony", 42000, 1983, 5, 23); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyThread { | |
public static void main(String[] args) { | |
new NameRunn("Один").start(); | |
new NameRunn("Два").start(); | |
new NameRunn("Три").start(); | |
} | |
} | |
class NameRunn extends Thread { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ru.thetekst.util; | |
public class Hello { | |
public static void main(String[] args) { | |
System.out.println(new java.util.Date() + " Привет мир"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- index.html --> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<form action="formdata.php" method="POST" name="form1"> | |
<p><input type="submit" name="submit" value="Отправить"></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$money = 100; | |
$shop = true; | |
if($shop && $money) { | |
echo "Go to shop"; | |
if($money > 10){ | |
echo "pricelist"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ru.thetekst.crocodile; | |
public class Crocodile { | |
private long t; | |
private boolean alive; | |
public Crocodile() { | |
t = System.currentTimeMillis(); | |
alive = true; | |
} |