mdsk.net
当前位置:首页 >> 三道JAVA上机编程题,求大神帮忙,做了很久,没做出来 >>

三道JAVA上机编程题,求大神帮忙,做了很久,没做出来

import java.util.Scanner;/** * 2016/11/23 17:51 * * @author 3306 TODO 计算打折 */public class DisCount { private...

第二题 一个doDemo方法搞定 这个是列出D盘下所有文件及文件目录,然后再列出所有的.txt后缀的文件。 static List allList = new ArrayList();static List txtList = new ArrayList();public static void doDemo() {File file = new File("D:" + ...

Student中定义toString方法。 ~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~

import java.util.Scanner; public class Test1 { public static void main(String[] args) { System.out.println("请输入会员积分:"); Scanner sc=new Scanner(System.in); int a=sc.nextInt(); sc.close(); if(a=2000&&a=4000&&a=8000){ Syste...

public class Student {private String id;private String name;public Student(String id, String name) {super();this.id = id;this.name = name;}public String getId() {return id;}public String getName() {return name;}public void disp...

/* class A extends Thread { public void run() { try { Thread.sleep(1000); }catch(Exception e) { System.out.println("A ERROR!"); } System.out.println("AAAA"); } } class B extends Thread { public void run() { try { Thread.sleep(2...

编写电池类(Cell):具有品牌属性,可以续电 public class Cell {private String brand;public String getBrand() {return brand;}public void setBrand(String brand) {this.brand = brand;}Cell(String brand){this.brand = brand;}public vo...

public class MinimalElements {public static void main(String[] args){Scanner sc=new Scanner(System.in);System.out.println("请输入n和m的值:");int n=sc.nextInt(),m=sc.nextInt();int a[]=new int[n];for(int i=0;i=0){int zan=a[p];a[...

定义的接口 public interface StackInterface { void push(Object value); Object pop(); boolean isEmpty(); } 实现类: public class StackImplement implements StackInterface{ private Vector vector; public StackImplement(){ this.vector...

建议可以直接找找以往笔试面试真题进行练习。

网站首页 | 网站地图
All rights reserved Powered by www.mdsk.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com