using System.Timers;
public static void Main (string[] args){
System.Timers.Timer t = new System.Timers.Timer(1000);
t.Elapsed += new ElapsedEventHandler(run);
t.Enabled = true;
黃彥霖 發表在 痞客邦 留言(0) 人氣(6,483)
//-- HashSet----------------------------------------
//無順序,但是加入相同物件的資料 會被過濾掉
import java.util.*;
public class SetTest{
public static void main(String[] args){
HashSet hs=new HashSet();
hs.add(8);
hs.add("darban");
hs.add(3.14159);
hs.add(new Date());
黃彥霖 發表在 痞客邦 留言(0) 人氣(486)
public static void main(String [] args){
int a = 5;
if(a==5){
System.out.println("中斷啦");
黃彥霖 發表在 痞客邦 留言(0) 人氣(512)
Socket cli;
while(true){
// 接收到的資料
黃彥霖 發表在 痞客邦 留言(0) 人氣(1,369)
using System;
namespace c // 在 c 資料夾
{
class MainClass
{
public static void Main (string[] args)
{
黃彥霖 發表在 痞客邦 留言(0) 人氣(6,986)
先建立A.txt,輸入 : <br>123<br>abc<br>456<br>
import java.io.*;
import java.util.*;
黃彥霖 發表在 痞客邦 留言(0) 人氣(293)
import java.io.*;
import java.net.*;
public class Downloader{
public static void main(String[] args)throws IOException{
URL url=new URL("http://163.20.63.180/javaroom/midi/alas/Other/td.mid");
黃彥霖 發表在 痞客邦 留言(0) 人氣(1,299)
import java.io.*;
public class A{
public static void main(String [] args) throws Exception{
File f = new File("gg.txt");
FileReader fr = new FileReader(f);
char [] fc = new char [(int)f.length()];
fr.read(fc);
fr.close();
黃彥霖 發表在 痞客邦 留言(0) 人氣(983)