Escape Characters in Java
n New line t Tab b Backspace r Carriage return f Formfeed \ Backslash ' Single quotation mark " Double quotation mark d Octal xd Hexadecimal ud Unicode character
n New line t Tab b Backspace r Carriage return f Formfeed \ Backslash ' Single quotation mark " Double quotation mark d Octal xd Hexadecimal ud Unicode character
This is a Simple Java program for shutdown your computer . here in this program I’m executing a system command for shutdown ( shutdown –s –t) though runtime . make sure that before you run this program : // save all the open programs and files before you run this program import java.io.*; class Shutdown{…
The goal of this post is go get an over view of the Java 9 and its features ! let’s dig into bit details . Schedule General availability is 07/27/2017 Features 102: Process API Updates 110: HTTP 2 Client 143: Improve Contended Locking 158: Unified JVM Logging 165: Compiler Control 193:…
In this post I’m going to use the properties(java.util.properties) class in database conenction, package Oracle.connection; import java.sql.*; import java.util.Properties; /** * * @author kattavijay */ public class DBConnect_Properties { public static void main(String a[])throws Exception { String url="jdbc:oracle:thin:@localhost:1521"; String username="scott"; String passwd="tiger"; Properties prop=new Properties(); prop.put("user",username); prop.put("password",passwd);…
There are some types to connect with Database , here in this example I’m going to work with Oracle Database. I’m using type-4 driver to connect to the data base. there are some steps to follow : Step 1: know your database url , username ,password . and make sure that ojdbc14.jar file should be…
a brief overview of features here i want to discuss most considerable features in java 8 ! Lambda expressions Pipeline and streams Data and time api Default methods Type annotations Nashron javascript engine Concurrent accumulators Parallel operations Permgen space removed TLS SNI
// 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