java variaables和jbutton .. [英] java variaables and jbutton..

查看:63
本文介绍了java variaables和jbutton ..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人帮我知道了当java
时如何运行另一个java类 jbutton单击.
以及如何使两个Java类中的变量相等.

pleace发布示例代码...谢谢.

somebody help me to know how to run another java class when java
jbutton clicked.
and how to equal variables in two java classes.

pleace post the sample code... thank you.

推荐答案

开始
Start here[^], for all Java classes. I''m not sure about sharing variables between classes (assuming you mean independently running) but I''m sure you can pass parameters when you exec a new class.
As to posting code, that, I''m afraid, is your responsibility.


没有运行Java类"这样的概念,您总是运行一个方法.没有相等变量"之类的东西.有一个将一个变量分配给另一个变量或比较所有变量的概念:如果变量相等,不相等或参照相等.

看来您不了解类是什么,类的实例是什么以及类的实例或静态成员是什么.因此,您需要开始阅读基本的Java主题,例如:
http://download. oracle.com/javase/tutorial/java/javaOO/classvars.html [
There is no such concept as "run Java class" — you always run a method. There is no such thing as "equal variables". There is a concept of assignment of one variable to another or comparison of tho variables: if they are equal, not equal or referentially equal or not.

It looks like you have no understanding of what a class is and what is its instance and what is the instance or static member of the class. So you need to start reading over on basic Java topics, something like this: http://download.oracle.com/javase/tutorial/java/javaOO/classvars.html[^].

—SA


这篇关于java variaables和jbutton ..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆