Operator :

While Loop :

For Loop : 

Arrays :

Code :

public class FirstJavaClass {

	public static void main(String[] args) {

		int arr[] = new int[5];
arr[0]=78;
arr[1]=980;
arr[2]=98;
arr[3]=9;
arr[4]=765; System.out.println(arr[2]);
System.out.println("Length of array is --" + arr.length);
for(int i = 0;i<arr.length;i++){
System.out.println(arr[i]);
} String str[] = new String[3];
str[0]="USA";
str[1]="india";
str[2]="uk";
//str[3]="uytr"; System.out.println("*************TWO DIM ARRAYS****************");
//[ROW][COL]
String s[][] = new String[2][4];
// 1st row
s[0][0]="hello";
s[0][1]="world";
s[0][2]="java";
s[0][3]="qtp"; // 2nd row
s[1][0]="usa";
s[1][1]="uk";
s[1][2]="India";
s[1][3]="Australia"; System.out.println("Rows are --- "+s.length);
System.out.println("cols are -- "+s[0].length); System.out.println(s[0][1]);
}
}

Result :

98
Length of array is --5
78
980
98
9
765
*************TWO DIM ARRAYS****************
Rows are --- 2
cols are -- 4
world

Object Arrays:

Functions :

[Training Video - 2] [Java Introduction] [Operator, Loops, Arrays, Functions]的更多相关文章

  1. [Training Video - 2] [Java Introduction] [Install Java and Eclipse, Create Class]

    Download Java : https://java.com/en/download/ Download Eclipse : https://www.eclipse.org/downloads/ ...

  2. [Training Video - 3] [Java Introduction] [Object Oriented Programming]

    Static and non-Static :  非静态方法(不带static)可以访问静态变量和方法(带static),但是反过来就不行. 类的静态成员(变量和方法)属于类本身,在类加载的时候就会分 ...

  3. [Training Video - 2] [Groovy Introduction]

    Building test suites, Test cases and Test steps in SOAP UI Levels : test step level test case level ...

  4. Java – How to join Arrays

    Java – How to join Arrays In this article, we will show you a few ways to join a Java Array. Apache ...

  5. [Training Video - 1] [Introduction to Web services]

    What is a web service? http://webservicex.net/ws/default.aspx WebService是一种跨编程语言和跨操作系统平台的远程调用技术. 跨编程 ...

  6. [Training Video - 6] [File Reading] [Java] Create and Write Excel File Using Apache POI API

    package com.file.properties; import java.io.File; import java.io.FileNotFoundException; import java. ...

  7. [Training Video - 6] [File Reading] [Java] Read Excel File Using Apache POI API

    读取以下两种格式的Excel : *.xls  and *.xlsx 用Apache POI API来实现,需要用到 HSSF 和 XSSF 的类库 HSSF is the POI Project's ...

  8. [Training Video - 6] [File Reading] [Java] Read Properties file

    package com.file.properties; import java.io.FileInputStream; import java.util.Properties; public cla ...

  9. 2018 Multi-University Training Contest 4 Problem E. Matrix from Arrays 【打表+二维前缀和】

    任意门:http://acm.hdu.edu.cn/showproblem.php?pid=6336 Problem E. Matrix from Arrays Time Limit: 4000/20 ...

随机推荐

  1. 谷歌浏览器怎么调试js 谷歌浏览器调试javascript教程

    谷歌浏览器是一款由谷歌公司开发的浏览器.谷歌浏览器是一款基于其他开源软件所撰写的.下面小编为大家分享一篇谷歌浏览器调试javascript的教程,希望帮助大家 首先我们打开开发者工具,你可以直接在页面 ...

  2. LG2831 愤怒的小鸟

    题意 分析 看n的范围只有18,考虑状压dp. 用\(f(s)\)表示过集合s中的点所需最小的抛物线数量. 然后枚举点对算抛物线,判断其他点是否在抛物线上来转移. 细节 判断能否构成抛物线只需要判断斜 ...

  3. PAT 1021 个位数统计 C语言

    1021. 个位数统计 (15) 给定一个k位整数N = dk-1*10k-1 + ... + d1*101 + d0 (0<=di<=9, i=0,...,k-1, dk-1>0) ...

  4. python的一些基本的建议

    一.编码风格 python程序要写的易于阅读 二.python代码的样式规则 遵循PEP8 4个spaces是一次缩排,不允许tabs,不允许混合使用space和tab,方法之间要有一个空行,类之间要 ...

  5. streamsets microservice pipeline 试用

    实际上还是一个pipeline,只是添加了一些规则以及内嵌的http server 方便我们对于基于http 或者类似轻量 协议数据的处理 基本环境 使用docker&& docker ...

  6. cratedb json 数据导入

    基本环境的搭建,可以参考相关文档,或者直接使用docker 安装 docker run -d -p 4200:4200 crate 导出mongodb数据(可选,同时使用工具进行数据类型转换) mon ...

  7. Appium Desktop介绍-xcodebuild failed with code 65 问题解决

    Appium Desktop介绍-xcodebuild failed with code 65  问题解决 一.Appium Desktop介绍 Appium Desktop是一款用于Mac.Wind ...

  8. SQL 相关分页方法

    [1] SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER OFFGO ALTER PROCEDURE [dbo].[procCom_Get_Pagination]( @ ...

  9. JZ2440 裸机驱动 第5章 GPIO接口

    本章目标:     掌握嵌入式开发的步骤:编程.编译.烧写程序.运行     通过GPIO的操作了解软件如何控制硬件 5.1 GPIO硬件介绍     S3C2440A有130个多功能输入/输出口引脚 ...

  10. 黄聪:WordPress实现HTML5预加载

    WordPress实现HTML5预加载方法很简单,把下面代码: <?php if (is_archive() && ($paged > 1) && ($pa ...