随笔分类 - JAVA 学习
摘要:public class ExampleFrame_02 extends JFrame{ public static void main(String[] args) { // TODO Auto-generated method stub ExampleFrame_02 exampleFrame_02 = new ExampleFrame_02(); ...
阅读全文
摘要:public class ExampleFrame_01 extends JFrame{ public static void main(String[] args) { // TODO Auto-generated method stub ExampleFrame_01 frame = new ExampleFrame_01(); fr...
阅读全文
摘要:public class Address { public static void main(String[] args) { // TODO Auto-generated method stub InetAddress ip; try { ip = InetAddress.getLocalHost(); ...
阅读全文
摘要:public class Test extends JFrame{ Thread threadA; public Test() { // TODO Auto-generated constructor stub Container c = getContentPane(); setDefaultCloseOperatio...
阅读全文
摘要:public class Test implements Runnable{ public static void main(String[] args) { // TODO Auto-generated method stub Test t = new Test(); Thread tA = new Thread(t); ...
阅读全文
摘要:public class ThreadSafeTest implements Runnable{ int num =10; public void run() { while (true) { synchronized ("") { if(num>0){ try { ...
阅读全文
摘要:public class PriorityTest extends JFrame{ private static final long seriaVersionUID = 1L; private Thread threadA; private Thread threadB; private Thread threadC; private Thread t...
阅读全文
摘要:public class JoinTest extends JFrame { private Thread threadA; final JProgressBar progressBar = new JProgressBar(); public JoinTest() { // TODO Auto-generated constructor stub ...
阅读全文
摘要:public class JoinTest extends JFrame { private Thread threadA; private Thread threadB; final JProgressBar progressBar = new JProgressBar(); final JProgressBar progressBar2 = new JPro...
阅读全文
摘要:public class SleepMethodTest extends JFrame { private Thread t; private static Color[] color = { Color.BLACK, Color.BLUE, Color.CYAN, Color.GREEN, Color.ORANGE, Color.YELLOW, Col...
阅读全文
摘要:public class SwingAndThread extends JFrame{ private JLabel jl = new JLabel(); private static Thread t; private int count =0; private Container container = getContentPane(); ...
阅读全文
摘要:List<String> l1 = new ArrayList<String>(); l1.add("成员"); List<?>l2 = l1; List<?>l3 = new LinkedList<Integer>(); System.out.println(l2.get(0)); List<?>
阅读全文
摘要:public class LimitClass { public static void main(String[] args) { LimitClassl1 = new LimitClass(); LimitClassl2 = new LimitClass(); //LimitClass l3 = new L...
阅读全文
摘要:public class MutiOverClass { public Map m = new HashMap(); public void put(K k,V v) { m.put(k, v); } public V get(K k) { return m.get(k); } public s...
阅读全文
摘要:public class Example_01 { public static void main(String[] args) { // TODO Auto-generated method stub try { FileOutputStream fs = new FileOutputStream("word.txt"); ...
阅读全文
摘要:System.out.println(System.getProperty("user.dir"));
阅读全文
摘要:public class Student { public static void main(String[] args) { // TODO Auto-generated method stub String content[] = {"好久不见","最近好吗","常联系",}; File file = new File("word.t...
阅读全文

浙公网安备 33010602011771号