完成几个小代码练习?让自己更加强大?学习新知识回顾一下基础? 1.输入数组计算最大值 2.输出数组反向打印 3.求数组平均值与总和 4.键盘输两int,并求总和 5.键盘输三个int,并求最值 /* 要求:输入一组数组,计算出最大值. */ public class cesi{ public static void main (String[] args) { int[] array = {5, 15, 100, 999, 1000}; int max = array[0]; for (int
这个在线聊天工具小项目使用JAVA编写,用JAVA来做图形界面本来就是出了名的低效和丑陋.不过这不是重点.写这个小项目的目的在于串一串J2SE的知识,把当时写这个项目的时候的思路梳理一下.时间有点久了,不过,拿出来再遛一遍算是个总结吧. 1·搭建客户端 在线聊天工具首先得有一个Client端,作为用户的交互界面.所以可以先搭建一个客户端的框架.把图形界面搭起来. 先做一个客户端类Client.java public class ChatClient { public static void ma
编写程序,计算数组中奇数之和和偶数之和. 代码: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Lab04 { class Program { static void Main(string[] args) { int n; int count_ji = 0; int count_ou = 0