This file contains hidden or 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 CosWave{ | |
| public static void main(String[] args){ | |
| int n = Integer.parseInt(System.console().readLine("いくつまでやりますか? ->")); | |
| double PI = 3.14; | |
| for(int i = 0; i < n; i ++){ | |
| try{ | |
| Thread.sleep(100); | |
| }catch(InterruptedException e){} | |
| int m = 10+(int)(10*Math.cos(PI*i/10)); | |
| for(int j = 0; j < m; j++) |
This file contains hidden or 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
| class EvenException extends Exception{}; | |
| class OddException extends Exception{}; | |
| class Even{ | |
| static void isEven(int i) throws EvenException, OddException{ | |
| if(i%2 == 0){ | |
| throw new EvenException(); | |
| }else{ | |
| throw new OddException(); | |
| } |
This file contains hidden or 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 javax.swing.*; | |
| import java.awt.*; | |
| import java.awt.event.*; | |
| class myPanel extends JPanel implements ActionListener, KeyListener{ | |
| int x = 30, y = 20; | |
| int dx = 12, dy = 5, d = 30; | |
| int padY = 55; | |
| int pd = 0; | |
| Timer pTimer; |
This file contains hidden or 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
| class ForFor{ | |
| public static void main(String[] args){ | |
| System.out.println("a回繰り返す中でb回繰り返すよ!"); | |
| int a = Integer.parseInt(System.console().readLine("a=")); | |
| int b = Integer.parseInt(System.console().readLine("b=")); | |
| for(int i = 0; i < a; i++){ //a回繰り返す | |
| for(int j = 0; j < b; j++){ //b回繰り返す |
This file contains hidden or 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
| あ |
This file contains hidden or 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
| class Hoge{ | |
| public static void main(String args[]){ | |
| int max = 500; //上限 | |
| int hantei = 0; | |
| int n = 0; | |
| int i = 0; | |
| for(i = 0; i < max; i++){ | |
| n =(int)(Math.random()*3); |
This file contains hidden or 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
| abstract class SushiYa{ | |
| static void vote(){ | |
| System.out.println("�ӉZ���i"); | |
| } | |
| } | |
| class Daisou extends SushiYa{ | |
| static void vote(){ | |
| System.out.println("���m���i"); | |
| } | |
| } |
This file contains hidden or 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
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <title>タイトル</title> | |
| </head> | |
| <body> | |
| ここに内容 | |
| </body> |
This file contains hidden or 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
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <title>MTGマン</title> | |
| </head> |