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 akademia_kodu; | |
import java.util.Random; | |
import java.util.Scanner; | |
public class losowanie { | |
public static void main(String[] args) { | |
Random los = new Random(); | |
Scanner skan = new Scanner(System.in); | |
; |
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.Random; | |
public class duzyLotek { | |
public static void main(String[] args) { | |
Random los = new Random(); | |
for (int i=1;i<=6;i++){ | |
System.out.println(los.nextInt(49)+1); | |
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.Scanner; | |
public class whilePetla { | |
public static void main(String[] args) { | |
Scanner skan = new Scanner(System.in); | |
int secret = 58; | |
int userNumber; | |
do { | |
System.out.println("Podaj liczbę : "); |
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.awt.event.*; | |
import javax.swing.*; | |
public class FirstSwingExample { | |
public static void main(String[] args) { | |
JFrame f=new JFrame(); | |
JButton b=new JButton("Kliknij"); | |
final JTextField tf=new JTextField(); |