佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1024|回复: 1

J2ME... 怎样 pass string 哦?

[复制链接]
发表于 28-10-2008 12:14 AM | 显示全部楼层 |阅读模式
想请教大家一下,j2me 里,要 share string 的话,应该要怎样哦?

那个 string 要 define 在哪里哦?

要怎样 define,怎样用哦?

好像我在这个 class 里 A = 5,然后在另外一个 class 里,也是可以读到 A 是等于 5 哦?
回复

使用道具 举报


ADVERTISEMENT

发表于 28-10-2008 12:49 PM | 显示全部楼层

回复 1# David84 的帖子

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package display2rd;

/**
*
* @author yuyike
*/
public class Main extends B{

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {

      String Z = Main.C;
      System.out.println(Z);
      
    }

}
class B{
    static String C = "5";
}
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 23-12-2025 12:12 AM , Processed in 0.185653 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表