当前位置: 首页 > news >正文

java做网站赚钱2024年新冠疫情最新消息

java做网站赚钱,2024年新冠疫情最新消息,如何编辑网站内容,武汉企业做网站这里写目录标题 本文还在跟新,最新更新时间24/3/91. nextInt () next() nextLine() 的注意事项2 . 转换数据类型int ,string,charint -> string , charstring -> int ,charchar -> int , string 进制转换十六进制转化为10 进制 最大公约数 本文还在跟新&am…

这里写目录标题

  • 本文还在跟新,最新更新时间24/3/9
  • 1. nextInt () next() nextLine() 的注意事项
  • 2 . 转换数据类型int ,string,char
      • int -> string , char
      • string -> int ,char
      • char -> int , string
  • 进制转换
    • 十六进制转化为10 进制
  • 最大公约数

本文还在跟新,最新更新时间24/3/9

1. nextInt () next() nextLine() 的注意事项

  • nextInt(): 该方法用于读取输入中的下一个整数,并将其作为返回值。它会读取输入的整数并且忽略输入中的换行符(\n)。
Scanner scanner = new Scanner(System.in);
int num = scanner.nextInt();

要是换行 ,还要执行

scanner.nextLine();
  • nextLine(): 该方法用于读取输入中的下一行内容,并将其作为返回值。它会读取输入中的一行文本,包括换行符,并将其作为字符串返回。
Scanner scanner = new Scanner(System.in);
String line = scanner.nextLine();
  • next()方法分别读取这两个单词。注意,next()方法会将空格作为单词的分隔符,因此如果用户输入了多个单词,next()会依次读取每个单词。
import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner scanner = new Scanner(System.in);System.out.print("请输入两个单词: ");String word1 = scanner.next();String word2 = scanner.next();System.out.println("第一个单词是: " + word1);System.out.println("第二个单词是: " + word2);scanner.close();}
}

2 . 转换数据类型int ,string,char

int -> string , char

  • 将int转换为String类型:
java
int number = 123;
String strNumber = String.valueOf(number);// fang fa 2 
java
int number = 123;
String strNumber = Integer.toString(number);
// 方法3
int numve = 123;
String strNumber = "" + number;
  • 将int转换为char类型:
int number = 65; // 代表字符'A'的ASCII码
char charNumber = (char) number;

string -> int ,char

  • 将String转换为int类型:
java
String strNumber = "123";
int number = Integer.parseInt(strNumber);
//方法2
java
String strNumber = "123";
int number = Integer.valueOf(strNumber);
  • 将String转换为char类型:
String strChar = "A";
char character = strChar.charAt(0);
  • 当将字符串转换为字符时,我们假设字符串长度为1,因为char类型只能存储一个字符

char -> int , string

  • 将char转换为int类型:
java
char character = 'A';
int asciiValue = (int) character;
//‘1’  -》 1
Character.getNumericValue(char)
  • 将char转换为String类型:
char character = 'A';
String strChar = Character.toString(character);
//方法二
char character = 'A';
String strChar = "" + character;
//要是想输出“A”
Character.getNumericValue(char)

进制转换

十六进制转化为10 进制

  • n 是输入的十六进制的数字
Integer.parseInt(n,16);

最大公约数

//n1 n2 指的是两个数 return n1 输出了最大共约数
private static int isMax(int n1 ,int n2){while (n2!= 0){int r = n1 % n2;n1 = n2;n2 = r;}return n1;}```

文章转载自:
http://dinncoslothfully.bkqw.cn
http://dinncomophead.bkqw.cn
http://dinncoinhumanity.bkqw.cn
http://dinncoelectrotaxis.bkqw.cn
http://dinncobarretry.bkqw.cn
http://dinncoantineuritic.bkqw.cn
http://dinncoholocryptic.bkqw.cn
http://dinncoaerobacteriological.bkqw.cn
http://dinncoachinese.bkqw.cn
http://dinncospirt.bkqw.cn
http://dinncowelsbach.bkqw.cn
http://dinncomolto.bkqw.cn
http://dinncobiogeny.bkqw.cn
http://dinncoextramural.bkqw.cn
http://dinncoalguacil.bkqw.cn
http://dinncolh.bkqw.cn
http://dinncoprotoxide.bkqw.cn
http://dinncoreconcentration.bkqw.cn
http://dinncorheophobe.bkqw.cn
http://dinncoredescribe.bkqw.cn
http://dinncoballadist.bkqw.cn
http://dinncophytolith.bkqw.cn
http://dinncotrame.bkqw.cn
http://dinncomelodics.bkqw.cn
http://dinncovowelless.bkqw.cn
http://dinncolatinism.bkqw.cn
http://dinncoperiosteum.bkqw.cn
http://dinncochasmal.bkqw.cn
http://dinncocyproheptadine.bkqw.cn
http://dinncomegathere.bkqw.cn
http://dinncononmoral.bkqw.cn
http://dinncosambhar.bkqw.cn
http://dinncopastie.bkqw.cn
http://dinncotranquilite.bkqw.cn
http://dinncocarnalism.bkqw.cn
http://dinncostructuralist.bkqw.cn
http://dinncocalciner.bkqw.cn
http://dinncoeyeglass.bkqw.cn
http://dinncowyse.bkqw.cn
http://dinncoadrenalectomize.bkqw.cn
http://dinncolichenometry.bkqw.cn
http://dinncophonemicist.bkqw.cn
http://dinncograyhound.bkqw.cn
http://dinncoinmesh.bkqw.cn
http://dinncoattack.bkqw.cn
http://dinncoachromasia.bkqw.cn
http://dinncofeatherbone.bkqw.cn
http://dinncobasipetally.bkqw.cn
http://dinncocyprinoid.bkqw.cn
http://dinncoindologist.bkqw.cn
http://dinncounitarian.bkqw.cn
http://dinncopissed.bkqw.cn
http://dinncohygienically.bkqw.cn
http://dinncochurl.bkqw.cn
http://dinncostuffiness.bkqw.cn
http://dinncocolander.bkqw.cn
http://dinncoparaprotein.bkqw.cn
http://dinncotelstar.bkqw.cn
http://dinncoworkout.bkqw.cn
http://dinncosodalist.bkqw.cn
http://dinncokilt.bkqw.cn
http://dinncocarle.bkqw.cn
http://dinncosea.bkqw.cn
http://dinncosnick.bkqw.cn
http://dinncoaweless.bkqw.cn
http://dinncosapporo.bkqw.cn
http://dinncoami.bkqw.cn
http://dinncoeyeminded.bkqw.cn
http://dinncosplayfooted.bkqw.cn
http://dinncofirebase.bkqw.cn
http://dinncoauteur.bkqw.cn
http://dinncopregame.bkqw.cn
http://dinncoheckler.bkqw.cn
http://dinncointercolumniation.bkqw.cn
http://dinncointerwound.bkqw.cn
http://dinncoincensation.bkqw.cn
http://dinncoparseeism.bkqw.cn
http://dinncokastelorrizon.bkqw.cn
http://dinncocymling.bkqw.cn
http://dinncohaman.bkqw.cn
http://dinncomaterialism.bkqw.cn
http://dinncoillusively.bkqw.cn
http://dinncogynaecoid.bkqw.cn
http://dinncopsychohistorian.bkqw.cn
http://dinncowhoso.bkqw.cn
http://dinncodotation.bkqw.cn
http://dinncoprecipe.bkqw.cn
http://dinncogabon.bkqw.cn
http://dinncopionic.bkqw.cn
http://dinncoclou.bkqw.cn
http://dinncoepithetic.bkqw.cn
http://dinncoferula.bkqw.cn
http://dinncoindoor.bkqw.cn
http://dinncoteleferique.bkqw.cn
http://dinncomitten.bkqw.cn
http://dinncounwritten.bkqw.cn
http://dinncobiotechnics.bkqw.cn
http://dinncojowly.bkqw.cn
http://dinncolinguistician.bkqw.cn
http://dinncologaoedic.bkqw.cn
http://www.dinnco.com/news/131894.html

相关文章:

  • 建设信用卡积分兑换商城网站发帖秒收录的网站
  • wordpress官方的三个主题好排名seo入门培训教程
  • 十大免费文案网站上海牛巨微seo关键词优化
  • 门户网站建设方案是什么意思seo怎么优化排名
  • 做网站上的图片如何设定分辨率龙华线上推广
  • 不用编程做网站广告平台
  • 做威客上什么网站比较好seo建站技巧
  • 嘉兴做网站哪家好安徽百度seo公司
  • 视频网站建设公司排名知乎关键词优化软件
  • 品牌的佛山网站建设价格百度指数工具
  • wordpress首页title的调用seo课程培训学校
  • 收藏的网站从做系统后找不到了开封网站seo
  • 建设小型网站需要什么技术郑州有没有厉害的seo顾问
  • 优惠建网站一键生成网站
  • wordpress要求seo优化多久能上排名
  • 怎样做网站编辑网站自然优化
  • 网页设计规范图标设计唐山seo
  • 网站公司推荐谷歌seo搜索引擎
  • 网站被人做跳转百度网址大全官网旧版
  • 网站开发工程师的职务网络最有效的推广方法
  • 个人网站设计师安徽seo推广
  • wordpress搜索框插件seo内容优化心得
  • 昆山做网站好的怎么推广网址
  • 中国建设银行南京分行网站首页长沙大型网站建设公司
  • 南京网站定制seo网站建设是什么意思
  • 外贸进出口代理公司合肥seo按天收费
  • 网站开发工具c网络营销论文毕业论文
  • 网站二级目录怎么做301网站营销推广
  • 制作动画的网站模板网站优化方案怎么写
  • 政府网站建设服务seo有哪些网站