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 Mondai14_2.java; | |
abstract class Student{ | |
void study(int hour){ | |
System.out.println("studied at home for " + hour + "hour(s)."); | |
} | |
abstract void work(int hour); | |
} | |
class Pattern1 extends Student{ |
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 Bird{ | |
void showName(){ | |
System.out.println("鳥の名前を表示します。"); | |
} | |
void about(){ | |
System.out.println("特徴や習性を表示します。"); | |
} | |
} | |
class Kestrel extends Bird{ |
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 Mondai16_3{ | |
public static void main(String[] args){ | |
MyThreadA a = new MyThreadA(); | |
MyThreadB b = new MyThreadB(); | |
a.start(); | |
b.start(); | |
} | |
} | |
class MyThreadA extends Thread{ |
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 Mondai17_1{ | |
public static void main(String[] args){ | |
Mondai17_1 m = new Mondai17_1(); | |
try{ | |
int su1 = Integer.parseInt(args[0]); | |
int su2 = Integer.parseInt(args[1]); | |
System.out.println("num#1 : " + su1); | |
System.out.println("num#2 : " + su2); | |
System.out.println("result : " + m.jouzan(su1,su2)); | |
}catch(Exception e){ |
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 java.io.*; | |
class Mondai18_1{ | |
public static void main(String[] args){ | |
String inputFileName = args[0]; | |
try{ | |
BufferedReader r = new BufferedReader(new FileReader(inputFileName)); | |
String line; | |
int sum=0; | |
while((line=r.readLine())!=null){ |
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 java.io.*; | |
class Mondai18_2{ | |
public static void main(String[] args){ | |
try{ | |
BufferedReader r = new BufferedReader(new FileReader("siken.txt")); | |
PrintWriter w = new PrintWriter(new BufferedWriter(new FileWriter(args[0]))); | |
String[] t=r.readLine().split(" "); | |
int[] a = new int[t.length]; | |
for(int i=0; i<a.length; 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
class Mondai19_1{ | |
public static void main(String[] args){ | |
System.out.println(args[0].toUpperCase() + ", and its length is " + args[0].length() + "."); | |
} | |
} |
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 Mondai19_2{ | |
public static void main(String[] args){ | |
double b=Double.parseDouble(args[0]); | |
double c=Double.parseDouble(args[1]); | |
double _A=Double.parseDouble(args[2]); | |
double a=Math.sqrt(c*c + b*b - c*b*Math.cos(_A)); | |
double area=b*a/2; | |
System.out.println("b:" + b + "\nc:" + c + "\nA:" + _A + "\narea : " + area); | |
} | |
} |
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 java.util.Random; | |
import java.io.*; | |
class Mondai19_3{ | |
public static void main(String[] args) throws Exception{ | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
boolean undone=true; | |
Random rand=new Random(); | |
while(undone){ | |
int my=0; |
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
<div class="pagination"> | |
<ul> | |
<?php | |
echo $this->Paginator->prev('«', | |
array( | |
'tag' => 'li', | |
'class' => 'prev', | |
), | |
$this->Paginator->link('«', array()), | |
array( |