Main program without argument array
/ * funny program ,but logic */
Class MyClass
{
public static void main(String …a)
{
System.out.println(“hello , JavaMix”);
}
}
/ * funny program ,but logic */
Class MyClass
{
public static void main(String …a)
{
System.out.println(“hello , JavaMix”);
}
}
Lambda expressions New date and time API List of JSR’s included , JSR 335, JEP 126 : Language-level support for lambda expressions JSR 223, JEP 174 : Project Nashorn, a JavaScript runtime which allows developers to embed JavaScript code within applications JSR 308, JEP 104 : Annotations on Java Types for Unsigned Integer Arithmetic JSR…
// package sampleprograms; import java.io.*; import java.net.*; /** * * @author katta vijay */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here try{ String ip = InetAddress.getLocalHost().getHostAddress(); System.out.println(ip); }catch(Exception e){ } } } —————————————————-output is———————— 10.0.0.223
this java program gives the system home path as output. /** * * @author katta vijay */ public class UserHomeExample { public static void main(String[] args) { System.out.println(“User Home Path: “+ System.getProperty(“user.home”)); } }
For each loop was introduced in java 1.5.0 basically it extends for loop in java . it referred as a enhanced for loop / for each statement / for each loop . Syntax : for (type var : arr) { // do something with var } example : package net.javamix.string.samples; public class ForEach { …
calculating latencies , for a program , query or an service / project ., after little research here i am deriving mechanism to calculate latencies, first iam considering database : here my aim is calculate execution time for a query. >before executing the query run ‘set timing on’ comamnd in sql command line >after this…
this program simply explains how to read data from the MS wordfile(.DOC) line by line using Apache POI, what is Apache POI and what is the need i already explain in previous post, you can find that post here for executing this program we need to download Apache POI api and make jar files in…