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. 《DSP using MATLAB》Problem 2.5

    2.代码: %% ------------------------------------------------------------------------ %% Output Info abo ...

  2. office 2013母版保存并调用

    如果觉得某个ppt的母版不错,想保存下来以后使用的话,那么执行 开始->另存为->  选择位置和格式,注意格式选择potx. 之后如果想要使用这组母版,怎么办呢? 浏览主题,打开之前保存的 ...

  3. test20181024 hao

    题意 分析 考场10分 直接\(O(nm)\)模拟即可. #include<cstdlib> #include<cstdio> #include<cmath> #i ...

  4. vue.js权威指南----代码解释实例

    1:P61(值绑定) <input type="checkbox" v-model="toggle" :true-value="a" ...

  5. Python中定时任务框架APScheduler

    前言 大家应该都知道在编程语言中,定时任务是常用的一种调度形式,在Python中也涌现了非常多的调度模块,本文将简要介绍APScheduler的基本使用方法. 一.APScheduler介绍 APSc ...

  6. 打造基于jQuery的智能选择输入框

    UPDATE:修正了在FireFox下显示的问题,重新copy CSS即可 写完这个名字忽然觉得有点标题党的嫌疑,但是又不知道什么样的名字比较合适,那就暂且这样吧. 今天要讲的东西比较简单,其中会用到 ...

  7. FFMPEG结构体分析:AVCodecContext(转)

    注:写了一系列的结构体的分析的文章,在这里列一个列表: FFMPEG结构体分析:AVFrameFFMPEG结构体分析:AVFormatContextFFMPEG结构体分析:AVCodecContext ...

  8. sqlite性能优化

    1.数据库性能上 1.1 批量事务插入,提升数据插入的性能 由于sqlite默认每次插入都是事务,需要对文件进行读写,那么减少事务次数就能简书磁盘读写次数从而获得性能提升. 1.2 单条sql优于多条 ...

  9. Mysql8.0 Public Key Retrieval is not allow错误的解决办法

    在使用Mysql 8.0时重启后启动项目的事后会报错com.mysql.jdbc.exceptions.jdbc4.MysqlNonTransientConnectionException: Publ ...

  10. alibaba fastjson的使用总结和心得

      最初接触alibaba fastjson是由于其性能上的优势,对比原来采用codehause.jackson的解析,在hadoop平台上的手动转换对象有着将近1/3的性能提升,但随着开发应用越来越 ...