易截截图软件、单文件、免安装、纯绿色、仅160KB

张孝祥《Java就业培训教程》源代码 02 部分

《Java就业培训教程》 作者:张孝祥 书中源码
《Java就业培训教程》P34源码
程序清单:Promote.java
class Promote
{
 public static void main(String args[])
 {
  byte b = 50;
  char c = 'a';
  short s = 1024;
  int i = 50000;
  float f = 5.67f;
  double d = .1234;
  double result = (f * b) + (i / c) - (d * s);
  System.out.println((f * b) + " + " + (i / c) + " - " + (d * s));
  System.out.println("result = " + result);
 }
}
《Java就业培训教程》P35源码
程序清单:TestScope.java
public class TestScope
{
 public static void main(String[] args)
 {
  int x = 12;          
  {
   int q = 96;  // x和q都可用
   System.out.println("x is "+x);
   System.out.println("q is "+q);
  }
        q = x;                 /* 错误的行,只有x可用, q 超出了作用域范围 */
        System.out.println("x is "+x);     
 }
}
《Java就业培训教程》P37源码
程序清单:TestVar.java
public class TestVar
{
    public static void main(String [] args)
    {
        int x;//应改为int x=0;
        x=x+1;   //这个x由于没有初始化,编译会报错。
        System.out.println("x is "+x);
 }
}
程序清单:Func1.java
public class Func1
{
 public static void main(String [] args)
 {
 /* 下面是打印出第一个矩形的程序代码*/
  for(int i=0;i<3;i++)
  {
   for(int j=0;j<5;j++)
   {
    System.out.print("*");
  &


相关文档:

Java NIO API详解

 
Java NIO API详解
在JDK
1.4以前,Java的IO操作集中在java.io这个包中,是基于流的阻塞(blocking)API。对于大多数应用来说,这样的API使用很方
便,然而,一些对性能要求较高的应用,尤其是服务端应用,往往需要一个更为有效的方式来处理IO。从JDK 1.4起,NIO
API作为一个基于缓冲区,并能提供非阻塞(non-blo ......

Myeclipse 8 keygen java source

public class MyEclipseGen {
private static final String LL = "Decompiling this copyrighted software is a violation of both your license agreement and the Digital Millenium Copyright Act of 1998 (http://www.loc.gov/copyright/legislation/dmca.pdf). Under section 1204 of the DMCA, penalties range up ......

Java实现链表之结点

class Node
{
private Object obj;
 private Node next;
//用数据域构造一个节点对象
public Node(Object obj)
{
this.obj=obj;
}
//返回下一节点的对象
public Node getNext()
{
return this.next;
}
//设置本节点的链域
public void setNext(Node next)
{
this.next=next;
}
//返回节点的数 ......

Java实现链表

class Link
{
private Node head;
public Link(Node head)
{
this.head=head;
}
public void addNode(Node node)
{
Node p=head;
while(true)
{
if(!p.hasNext())
{
p.setNext(node);
break;
}
p=p.getNext();
}
}
//插入节
public void insertNode(Node p,Node q)
{
q.setNext(p.getNext());
p.se ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号