???%20java?? - PowerPoint PPT Presentation

About This Presentation
Title:

???%20java??

Description:

java 13007432216 220436907 QQ:346260267 ysh_at_hnu.edu.cn kczx.hnu.cn 1 // ... – PowerPoint PPT presentation

Number of Views:143
Avg rating:3.0/5.0
Slides: 9
Provided by: ysh70
Category:
Tags: 20java | class | java | scanner

less

Transcript and Presenter's Notes

Title: ???%20java??


1
??? java??
  • ???
  • ??? 13007432216
  • ?220436907 QQ346260267
  • ysh_at_hnu.edu.cn
  • kczx.hnu.cn
  • ?????

2
  • ????
  • 1.?? // ???? / ???? /
  • 2???????????????,?????,???????????
  • 3????????,???????
  • 4?public class ?? ????????????
  • 5?int long short char byte boolean float
    double
  • 5???
  • System.out.print(??????)
  • System.out.println(??????)
  • \r \n \t \\ \" ?? ?? ?? \ "
  • System.out.printf("?????",?????)
  • md m.nf e g u o s c
  • String.format("?????",?????)

3
  • ????
  • 6???import java.util.Scanner
  • Scanner inputnew Scanner(System.in)
  • int i1input.nextInt() nextByte(),nextLong(),
    nextShort()
  • float f1input.nextFloat()nextDouble(),
  • String s1input.nextLine()
  • System.in.read()
  • BufferedReader brnew BufferedReader(new
    InputStreamReader(System.in))
  • Integer.parseInt() Float.parseFloat()
  • Double.parseDouble()
  • 7? / - (?????) 10/3?3,??3.333
  • lt gt lt gt(??????2?) ! (??) ?-?-?

4
(No Transcript)
5
(No Transcript)
6
  • ????
  • 6???import java.util.Scanner
  • Scanner inputnew Scanner(System.in)
  • int i1input.nextInt()
  • ??String,System ??java.lang??,???????,????
  • ??????class??,???????,?????
  • 7?????
  • Math.abs() Math.ceil() Math.floor(),Math.max(),
    Math.min() Math.random() 0-1
  • Math.rint(11.5) Math.rint(10.5) ,Math.round()
  • Math.int() Math.sin(),Math.cos(),Math.exp(),
  • Math.long() Math.pow(a,b) Math.sqrt()
  • Math.toDegrees() Math.toRadians()

7
(No Transcript)
8
?????? ??????,???????2??4?????
??????? ??????,?????????,???, ??,????,????
Write a Comment
User Comments (0)
About PowerShow.com