java编程题全集及答案
作者&投稿:权叔 (若有异议请与网页底部的电邮联系)
禹阎13743892194问: java编程题?
察隅县减味回答: import java.util.Scanner; public class tt {public static void main(String[] args) { System.out.println("请输入a,b,c的值逗号隔开:"); Scanner input = new Scanner(System.in); String str = input.next(); String s[] = str.split(","); int a = Integer....
禹阎13743892194问: JAVA 编程题 - ?
察隅县减味回答: public class ExceptionTest { public static void main(String[] args) { //自定的错误消息字符串 String err = "这是一个Exception测试."; try{ //抛出自定义的异常...
禹阎13743892194问: 简单java编程题 - ?
察隅县减味回答: 第一题 public class A{ public static void main(String[] args){ int i,j,k,x; for(x=100;x { i=x/100; j=x/10%10; k=x%10; if(x==i*i*i+j*j*j+k*k*k) System.out.println(x); } } } 第二题 public class A{ public static void main(String args[]){ int sum=0; for(int j=2;j int x=...
禹阎13743892194问: java编程题 - ?
察隅县减味回答: import java.util.*; import java.io.*; class Main{ public static void main(String[] args) throws Exception{ String[] ts={"A.txt","B.txt","C.txt"}; Scanner[] ss=new Scanner[ts.length]; for(int i=0;i ss[i] = new Scanner(new File(ts[i]));} ArrayList list1=...
禹阎13743892194问: java编程题 - ?
察隅县减味回答: public class Area { public Area(){} //圆public static double round_area(double r){ return 3.1415926*r*r; } //三角形 public static double trigon_area(double b,double h){ re...
禹阎13743892194问: 急求下列 java 程序题答案!请各位多多帮忙 - ?
察隅县减味回答: 第一题 publci class Jiechen public staic void main(String[] args){ int[] intNum={2,4,6,10}; long result=1; for(int i=0,i =50) intGeshu++; } Arrays.sort(intrndNum);//对数组进行从小到大排序 System.out.println(intGeshu);//打印大于50的个数 System.out...
禹阎13743892194问: JAVA基础编程题~ - ?
察隅县减味回答: public class student { String name; int age; public String Student(String mz,i...
禹阎13743892194问: JAVA基础编程题 - ?
察隅县减味回答: package com.qiu.swing.layoutDemo;import java.awt.Container;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.Box;import javax.swing.BoxLayout;impo...
禹阎13743892194问: java编程题目?
察隅县减味回答: 楼上正解,很好的面向对象的思想^-^ 这里从另外的一个角度来实现: 分析一下,这道题是比较圆面积,而圆面积=PAI * r^2,只与半径r有关,所以,这道题的本质是比较,三个圆的半径大小. public class Test{public static void main(String[] ...
禹阎13743892194问: JAVA编程题(String) - ?
察隅县减味回答: package com.zzb.test;import java.util.regex.Matcher;import java.util.regex.Pattern;public class Test {public boolean isNum(int c) {return 48 <= c = c;}//通过比...