⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 textcomplex.java

📁 java编写的小程序
💻 JAVA
字号:
import java.lang.*;
import javax.swing.*;
class  Complex
{     private int x;
	  private int y;
     public void setx(int x1)
	   {this.x=x1;}
	 public int getx()
	   {return x;}
     public void sety(int y1)
	   {this.y=y1;}
	 public int gety()
	   {return y;}
    Complex()
		{x=0;y=0;}
    Complex(int a)
		{x=a;y=0;}
    Complex(int a,int b)
		{x=a;y=b;}
  void mode()
    {
        System.out.println(Math.sqrt(x*x+y*y));
    }
}
public class TextComplex
{  public static void main(String[] args)  
		{
	      Complex  Complex1=new Complex();
          Complex1.setx(1);
		  Complex1.sety(2);
		  Complex1.mode();
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -