码迷,mamicode.com
首页 >  
搜索关键字:println    ( 5792个结果
6.2Java_if语句的三种格式
1. if(关系表达式){ 语句体1; }执行流程:如果关系表达式成立,则执行语句体1,如果关系表达式不成立,则不执行语句体1. System.out.println("开始执行"); //定义俩个整形的变量数据 int a = 10; int b = 10; //判断俩个变量是否相等 if (a ...
分类:编程语言   时间:2021-03-15 10:38:19    阅读次数:0
多线程的实现方法
一.创建线程的几种方式: 1.实现Runnable接口 1 public class RunnableThread implements Runnable { 2 3 @Override 4 5 public void run() { 6 7 System.out.println('用实现Runna ...
分类:编程语言   时间:2021-03-11 11:42:35    阅读次数:0
if,switch选择结构,while,do......while循环结构
顺序语句 案例 package com.bk201.struct; public class ShunXuDemo { public static void main(String[] args) { System.out.println("H"); System.out.println("e"); ...
分类:其他好文   时间:2021-03-10 13:13:09    阅读次数:0
xxx.java:1: 错误: 类xxx是公共的, 应在名为 xxx.java 的文件中声明 public class xxx
在学习过程中敲如下的一段代码: public class example4{ public static void main(String[] args){ int n=9; while(n>6){ System.out.println("n = "+n); n--; } } } 文件名为 exam ...
分类:编程语言   时间:2021-03-09 13:56:20    阅读次数:0
Java SE基础小知识
学习java的每日小收获 字符串连接符 以下面代码为例: public static Medo02{ public static void main(String agrs[]){ int i=10; int j=20; System.out.println(" "+i+j);//字符串连接符号 S ...
分类:编程语言   时间:2021-03-09 13:04:21    阅读次数:0
Golang——hello world
hello world package main import "fmt" func main() { fmt.Println("hello world") } 1 代码结构 1 Go以 包 为单位 2 每个文件必须声明一个包 3 程序必须仅有一个main包 func main() // 程序入口函 ...
分类:其他好文   时间:2021-03-08 14:06:02    阅读次数:0
Java方法的重载
Java方法的重载 方法重载:在类中方法名称相同,但是形式参数不同 public class Demo15 { public static void main(String[] args) { int sum= max(30,30); System.out.println(sum); double ...
分类:编程语言   时间:2021-03-08 13:32:56    阅读次数:0
Scanner用户交互
public class Demo03 { public static void main(String[] args) { //从键盘接收数据 Scanner scanner = new Scanner(System.in); System.out.println("请输入数据:"); Strin ...
分类:其他好文   时间:2021-03-08 13:31:19    阅读次数:0
java数组的声明创建
数组声明创建 获取数组的长度:数组名.length 增强型for循环 int [] arrays = {1,2,3,4,5}; for (int array : arrays) { System.out.println(array); 数组的声明 dataType[] arrayRefVar; // ...
分类:编程语言   时间:2021-03-08 13:17:19    阅读次数:0
Java小面试题
今天练习数组发现一个关于数组的小练习,记录一下; `public class ArrayPrintTest { public static void main(String[] args) { int[] arr = new int[]{1,2,3}; System.out.println(arr) ...
分类:编程语言   时间:2021-03-08 13:04:49    阅读次数:0
5792条   上一页 1 ... 7 8 9 10 11 ... 580 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!