Topic: 昨天是 java 10周年庆祝,怎么大家都忘记了:)

  Print this page

1.昨天是 java 10周年庆祝,怎么大家都忘记了:) Copy to clipboard
Posted by: emarket
Posted on: 2005-05-24 02:06

长夜慢慢 无心睡眠,偶然发现竟然昨天 23-May-2005 是个大日子,java 10岁了,庆祝一下。。。:)

2.Re:昨天是 java 10周年庆祝,怎么大家都忘记了:) [Re: emarket] Copy to clipboard
Posted by: floater
Posted on: 2005-05-24 05:21

hmm, yea, 庆祝一下!!!!

3.Re:昨天是 java 10周年庆祝,怎么大家都忘记了:) [Re: emarket] Copy to clipboard
Posted by: 阿熊
Posted on: 2005-05-24 07:59


helloworld.java

4.Re:昨天是 java 10周年庆祝,怎么大家都忘记了:) [Re: zua] Copy to clipboard
Posted by: Big Blue
Posted on: 2005-05-24 08:10

测试

package com.borland.samples.welcome;

import java.awt.*;
import javax.swing.UIManager;

public class WelcomeApp {
boolean packFrame = false;

/**
* Construct the application
*/
public WelcomeApp() {
WelcomeFrame frame = new WelcomeFrame();

//Pack frames that have useful preferred size info, e.g. from their layout
//Validate frames that have preset sizes
if (packFrame)
frame.pack();
else
frame.validate();

// Center the frame
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = frame.getSize();
if (frameSize.height > screenSize.height)
frameSize.height = screenSize.height;
if (frameSize.width > screenSize.width)
frameSize.width = screenSize.width;
frame.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);

frame.setVisible(true);
}

/**
* Main method
*
* @param args String[]
*/
static public void main(String[] args) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch(Exception e) {
e.printStackTrace();
}
new WelcomeApp();
}
}


5.Re:昨天是 java 10周年庆祝,怎么大家都忘记了:) [Re: emarket] Copy to clipboard
Posted by: Big Blue
Posted on: 2005-05-24 08:12

测试2

unit Ffactwin;

{ This application shows how to display Paradox style memo and graphic
fields in a form. Table1's DatabaseName property should point to the
Delphi sample database. Table1's TableName property should be set to
the BIOLIFE table. }

interface

uses
SysUtils, Windows, Messages, Classes, Graphics, Controls,
Forms, StdCtrls, DBCtrls, DBGrids, DB, DBTables, Buttons, Grids, ExtCtrls;

type
TForm1 = class(TForm)
Panel1: TPanel;
Label1: TLabel;
DBImage1: TDBImage;
DBLabel1: TDBText;
DBMemo1: TDBMemo;
DataSource1: TDataSource;
Table1: TTable;
Table1Common_Name: TStringField;
Table1Graphic: TBlobField;
DBGrid1: TDBGrid;
BitBtn1: TBitBtn;
Table1Category: TStringField;
Table1SpeciesName: TStringField;
Table1Lengthcm: TFloatField;
Table1Length_In: TFloatField;
Table1Notes: TMemoField;
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

end.

6.Re:昨天是 java 10周年庆祝,怎么大家都忘记了:) [Re: emarket] Copy to clipboard
Posted by: Big Blue
Posted on: 2005-05-24 08:16

测试3

using System;
using System.Collections;
using J2EE.Naming;
using J2EE.Rmi;
using com.borland.examples.ejb.shoppingcart;

class CartClient {

static void Main(string[] args) {
try {
// bootstrap to the J2EE naming service
Context root = new InitialContext(args);

// resolving CartHome object from the naming context
object homeObj = root.Lookup("shoppingcart/remote/cart");
CartHome home = (CartHome) PortableRemoteObject.Narrow(homeObj, typeof(CartHome));

// creating a new instance of Cart session
string cardHolderName = "Jack B. Quick";
string creditCardNumber = "1234-5678-9012-3456";
DateTime expirationDate = new DateTime();
Cart cart = home.Create(cardHolderName, creditCardNumber, expirationDate);

// adding a new book into the cart
Item item1 = new Book();
item1.Title = "War and Peace";
item1.Price = 20.12f;
cart.AddItem(item1);

// adding a new CD into the cart
Item item2 = new CompactDisc();
item2.Title = "Kind of Blue";
item2.Price = 11.97f;
cart.AddItem(item2);

// printing out the current contents of the cart
Summarize(cart);

// removing the book from the cart
cart.RemoveItem(item1);

// adding another book into the cart
Item item3 = new Book();
item3.Title = "Crime and Punishment";
item3.Price = 31.33f;
cart.AddItem(item3);

// printing out the current contents of the cart
Summarize(cart);

// trying to purchase the contents of the cart
// expecting an exception to be thrown
try {
cart.Purchase();
}
catch(PurchaseProblemException e) {
Console.WriteLine("Could not purchase the items: " +
"caught expected exception " + e.GetType().FullName);
}

// releasing the cart instance
cart.Remove();
}
catch(Exception e) {
Console.WriteLine("Caught an unexpected exception: ");
Console.WriteLineEnvelope;
Console.WriteLine("Make sure you started the AppServer and deployed Cart example !!!");
}
Console.ReadLine();
}

private static void Summarize(Cart cart) {
Console.WriteLine("======= Cart Summary ========");
IList items = cart.GetContents();
for(int i = 0; i < items.Count; i++) {
Item current = (Item) items[i];
Console.WriteLine("Item N" + (i + 1));
Console.WriteLine("Title: " + current.Title);
Console.WriteLine("Price: $" + current.Price);
Console.WriteLine("");
}
Console.WriteLine("Total: $" + cart.GetTotalPrice());
Console.WriteLine("=============================");
Console.WriteLine("");
}

}


7.Re:昨天是 java 10周年庆祝,怎么大家都忘记了:) [Re: emarket] Copy to clipboard
Posted by: jigsaw
Posted on: 2005-05-24 09:28

昨天啊?我还以为早就过了类。

8.Re:昨天是 java 10周年庆祝,怎么大家都忘记了:) [Re: jigsaw] Copy to clipboard
Posted by: haibo
Posted on: 2005-05-24 12:52


public class Hello{
public static void main(String args[]){
//do some
}
}


good work

9.Re:昨天是 java 10周年庆祝,怎么大家都忘记了:) [Re: haibo] Copy to clipboard
Posted by: jigsaw
Posted on: 2005-05-24 13:04


// asdfasfasdf
import a.b.c.D;

public abstract class E extends F implements G {
protected abstract H() throws I;
private String j(int k) { return k + ""; }
}

10.Re:昨天是 java 10周年庆祝,怎么大家都忘记了:) [Re: emarket] Copy to clipboard
Posted by: yj780210
Posted on: 2005-05-24 14:35

倒!没想到庆祝方式这么特别。偶昨天重新在一家公司上班,呵呵。同庆同庆

11.Re:昨天是 java 10周年庆祝,怎么大家都忘记了:) [Re: emarket] Copy to clipboard
Posted by: errorter
Posted on: 2005-05-24 16:19


12.Re:昨天是 java 10周年庆祝,怎么大家都忘记了:) [Re: emarket] Copy to clipboard
Posted by: chenyajun5
Posted on: 2005-05-24 17:56

tesdt

13.Re:昨天是 java 10周年庆祝,怎么大家都忘记了:) [Re: emarket] Copy to clipboard
Posted by: jameszhang
Posted on: 2005-05-25 20:34

测试
public class Test
{
public static void main(String []args)
{
System.out.println( new HelloWorld());
}
}

class HellowWorld
{
public String toString()
{
return "Hello world";
}
}

14.Re:昨天是 java 10周年庆祝,怎么大家都忘记了:) [Re: emarket] Copy to clipboard
Posted by: Qlympiad
Posted on: 2005-05-25 21:57

helloworld

15.Re:昨天是 java 10周年庆祝,怎么大家都忘记了:) [Re: emarket] Copy to clipboard
Posted by: littledeer1974
Posted on: 2005-05-26 10:15



class HelloWorld{
public static void main(String[] args){
System.put.print("Hello World");
}
}

16.Re:昨天是 java 10周年庆祝,怎么大家都忘记了:) [Re: emarket] Copy to clipboard
Posted by: littledeer1974
Posted on: 2005-05-26 10:16

终于能显示漂亮的JAVA代码了
庆祝
感谢
辛苦了

17.Re:昨天是 java 10周年庆祝,怎么大家都忘记了:) [Re: emarket] Copy to clipboard
Posted by: imain
Posted on: 2005-05-27 20:16

Oak-->Java


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923