随笔分类 -  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(); ... 阅读全文
posted @ 2019-04-09 09:24 小小超plus 阅读(344) 评论(0) 推荐(0)
摘要:public class ExampleFrame_01 extends JFrame{ public static void main(String[] args) { // TODO Auto-generated method stub ExampleFrame_01 frame = new ExampleFrame_01(); fr... 阅读全文
posted @ 2019-04-09 09:14 小小超plus 阅读(498) 评论(0) 推荐(0)
摘要:服务端 客户端 阅读全文
posted @ 2019-04-06 12:43 小小超plus 阅读(198) 评论(0) 推荐(0)
摘要:服务器端 客户端 阅读全文
posted @ 2019-04-04 12:19 小小超plus 阅读(196) 评论(0) 推荐(0)
摘要:public class Address { public static void main(String[] args) { // TODO Auto-generated method stub InetAddress ip; try { ip = InetAddress.getLocalHost(); ... 阅读全文
posted @ 2019-04-04 10:53 小小超plus 阅读(2444) 评论(0) 推荐(0)
摘要:public class Test extends JFrame{ Thread threadA; public Test() { // TODO Auto-generated constructor stub Container c = getContentPane(); setDefaultCloseOperatio... 阅读全文
posted @ 2019-04-03 18:56 小小超plus 阅读(135) 评论(0) 推荐(0)
摘要: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); ... 阅读全文
posted @ 2019-04-03 18:41 小小超plus 阅读(285) 评论(0) 推荐(0)
摘要:public class ThreadSafeTest implements Runnable{ int num =10; public void run() { while (true) { synchronized ("") { if(num>0){ try { ... 阅读全文
posted @ 2019-04-03 18:34 小小超plus 阅读(134) 评论(0) 推荐(0)
摘要:public class PriorityTest extends JFrame{ private static final long seriaVersionUID = 1L; private Thread threadA; private Thread threadB; private Thread threadC; private Thread t... 阅读全文
posted @ 2019-04-03 18:25 小小超plus 阅读(218) 评论(0) 推荐(0)
摘要:public class JoinTest extends JFrame { private Thread threadA; final JProgressBar progressBar = new JProgressBar(); public JoinTest() { // TODO Auto-generated constructor stub ... 阅读全文
posted @ 2019-04-03 17:43 小小超plus 阅读(107) 评论(0) 推荐(0)
摘要:public class JoinTest extends JFrame { private Thread threadA; private Thread threadB; final JProgressBar progressBar = new JProgressBar(); final JProgressBar progressBar2 = new JPro... 阅读全文
posted @ 2019-04-03 17:34 小小超plus 阅读(139) 评论(0) 推荐(0)
摘要: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... 阅读全文
posted @ 2019-04-03 12:19 小小超plus 阅读(147) 评论(0) 推荐(0)
摘要:public class SwingAndThread extends JFrame{ private JLabel jl = new JLabel(); private static Thread t; private int count =0; private Container container = getContentPane(); ... 阅读全文
posted @ 2019-04-03 11:24 小小超plus 阅读(277) 评论(0) 推荐(0)
摘要:List<String> l1 = new ArrayList<String>(); l1.add("成员"); List<?>l2 = l1; List<?>l3 = new LinkedList<Integer>(); System.out.println(l2.get(0)); List<?> 阅读全文
posted @ 2019-04-03 10:26 小小超plus 阅读(155) 评论(0) 推荐(0)
摘要:public class LimitClass { public static void main(String[] args) { LimitClassl1 = new LimitClass(); LimitClassl2 = new LimitClass(); //LimitClass l3 = new L... 阅读全文
posted @ 2019-04-03 10:21 小小超plus 阅读(357) 评论(0) 推荐(0)
摘要: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... 阅读全文
posted @ 2019-04-03 10:09 小小超plus 阅读(739) 评论(0) 推荐(0)
摘要:好像c/c++里面也有这个东西,不过用的不多。 阅读全文
posted @ 2019-04-03 09:54 小小超plus 阅读(649) 评论(0) 推荐(0)
摘要:public class Example_01 { public static void main(String[] args) { // TODO Auto-generated method stub try { FileOutputStream fs = new FileOutputStream("word.txt"); ... 阅读全文
posted @ 2019-03-26 12:46 小小超plus 阅读(210) 评论(0) 推荐(0)
摘要:System.out.println(System.getProperty("user.dir")); 阅读全文
posted @ 2019-03-26 12:45 小小超plus 阅读(152) 评论(0) 推荐(0)
摘要:public class Student { public static void main(String[] args) { // TODO Auto-generated method stub String content[] = {"好久不见","最近好吗","常联系",}; File file = new File("word.t... 阅读全文
posted @ 2019-03-26 11:46 小小超plus 阅读(705) 评论(0) 推荐(0)