[Training Video - 2] [Java Introduction] [Operator, Loops, Arrays, Functions]
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]的更多相关文章
- [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/ ...
- [Training Video - 3] [Java Introduction] [Object Oriented Programming]
Static and non-Static : 非静态方法(不带static)可以访问静态变量和方法(带static),但是反过来就不行. 类的静态成员(变量和方法)属于类本身,在类加载的时候就会分 ...
- [Training Video - 2] [Groovy Introduction]
Building test suites, Test cases and Test steps in SOAP UI Levels : test step level test case level ...
- 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 ...
- [Training Video - 1] [Introduction to Web services]
What is a web service? http://webservicex.net/ws/default.aspx WebService是一种跨编程语言和跨操作系统平台的远程调用技术. 跨编程 ...
- [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. ...
- [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 ...
- [Training Video - 6] [File Reading] [Java] Read Properties file
package com.file.properties; import java.io.FileInputStream; import java.util.Properties; public cla ...
- 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 ...
随机推荐
- Java---SSH(MVC)面试
Java---SSH(MVC) 1. 谈谈你mvc的理解 MVC是Model—View—Controler的简称.即模型—视图—控制器.MVC是一种设计模式,它强制性的把应用程序的输入. ...
- Maven与eclipse整合
版权声明: https://blog.csdn.net/zdp072/article/details/37355993 一. 创建Java项目 第1步:首先导入前面命令行建立的两个maven项目Hel ...
- IT项目管理的十六个字心得体会
目标驱动,系统思维,风险意识,数据量化 凡事预则立,不预则废.如果你不知道要到哪里?给你一张地图也没有用.目标驱动首先要有最基本的计划管理和时间管理能力.对于一个项目,我们过程中做的所有工作都是为了要 ...
- A-B Problem nyoj
A-B Problem 时间限制:1000 ms | 内存限制:65535 KB 难度:3 描述 A+B问题早已经被大家所熟知了,是不是很无聊呢?现在大家来做一下A-B吧. 现在有两个实数A和 ...
- HttpHelp 请求帮助类
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net ...
- erlang和ruby互相调用
erlang调用ruby https://github.com/mojombo/erlectricity ruby调用erlang https://github.com/davebryson/rint ...
- emacs之配置2,UI基本设置
在-下建立目录emacsConfig,里面建立一些自己写的el脚本,下面是名字随便,我的 emacsConfig/ui-setting.el ;关闭Emacs的默认启动界面 (setq inhibit ...
- 使用sublime text3手动安装插件
众所周知,由于网络问题,使用install package可能会连不上服务器,这时候就不得不手动安装插件了. 其实sublime安装插件的原理就是当你搜索一个插件并安装的时候,它回去github找到这 ...
- GREENPLUM简介
什么是GREENPLUM? 对于很多IT人来说GREENPLUM是个陌生的名字.简单的说它就是一个与ORACLE, DB2一样面向对象的关系型数据库.我们通过标准的SQL可以对GP中的数据进行访问存取 ...
- 学习blus老师js(1)--基础
1.网页换肤: <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <t ...