发布时间:2024-01-12 07:51来源:www.sf1369.com作者:宇宇
可以先采纳学习java初级语言,其次就是web,数据库初级,高级sql,mysql,oracle,因为JAVA这门语言太强大,推荐你去下个开发软件Myeclips 7.5,工具很强大.!多去买些项目的书籍,还会更加进一步的学习,spring,struts2,hiberate,3大框架,完美震撼~
我用的是V512视频,javaWeb项目整合开发,还有一些关于邮箱的教学,你搜索下试试看
int thisM = 567;
int h = thisM/60;
int m = thisM%60;
System.out.print(576分钟等于+ h +时+ m +分);
java是sun的一个面向对象的编程语言,主要分为j2se j2ee j2me j2me开发手机,pda等程序 j2ee开发b/s系统 j2se 开发桌面程序但使用比较少
public class Triangle {
private double a;
private double b;
private double c;
public Triangle() {
super();
}
public Triangle(double a, double b, double c) {
super();
if (validate(a, b, c)) {
this.a = a;
this.b = b;
this.c = c;
} else {
double min = Math.min(Math.min(a, b), c);
this.a = min;
this.b = min;
this.c = min;
}
}
public double getArea() {
double p = (a + b + c) / 2;
return Math.sqrt(p * (p - a) * (p - b) * (p - c));
}
public static boolean validate(double a, double b, double c) {
return (a > 0) && (b > 0) && (c > 0) && ((a + b) > c) && ((a + c) > b) && ((b + c) > a);
}
public double getA() {
return a;
}
public void setA(double a) {
this.a = a;
}
public double getB() {
return b;
}
public void setB(double b) {
this.b = b;
}
public double getC() {
return c;
}
public void setC(double c) {
this.c = c;
}
}
可以用inputStream和outStream输入流来写
程序如下:import java.io.*;
public class li{
public static void main(String args[]) throws IOException
{
char ch,s;
File file1=new File(D:\\1.txt);
File file2=new File(D:\\2.txt);
FileOutputStream fout=new FileOutputStream(file1);
FileOutputStream tout=new FileOutputStream(file2);
System.out.println(输入任何一个字符串,以!结束);
ch=(char)System.in.read();
while(ch!='!')
{
fout.write(ch);
tout.write(ch);
ch=(char)System.in.read();
}
fout.close();
System.out.println(输入任何一个字符串,以!结束);
s=(char)System.in.read();
while(s!='!')
{
tout.write(s);
s=(char)System.in.read();
}
tout.close();
}