INTRODUCION TO JAVA

        Java is an Object Oriented Programming language created by James Gosling from Sun Microsystems (Sun) in 1991. Java is simple object-oriented, distributed, interpreted, robust, secure, architecture neutral, portable, multithreaded, high-performance and dynamic language. Java is a platform independent programming language. The syntax is similar to C++. Write a Java program once then it will run on multiple operating systems. The first Java version is released in 1995.

        Like any other programming languages the Java programming language has it's own structure, syntax, and programming paradigm. The Java language's programming paradigm is based on the concept of OOP, which the language's features support. The Java language is a C language derivative, so syntax rules look much like C's. For example, code blocks are modularized into methods and delimited by braces ({ and }), and the variables are declared before they are used. Structurally, the Java language start with packages. A package is the Java languages namespace mechanism. Within packages are classes, and within classes are methods, variables, constants and more.

DEFINITION
        Java is a general-purpose computer programming language that is concurrent, class-based, object oriented and specifically designed to have as few implementation dependencies as possible. It is indented to let application developers 'write once, run anywhere'. Meaning that compiled Java code can run all platforms that support Java without the need for recompilation. Java applications are typically compiled to byte code that can run on any Java Virtual Machine (JVM) regardless of computer architecture.

HOW JAVA DIFFER FROM C++?
C++
Java
Compile to machine code
Compiled to byte code.
Supports pointer
Does not supports pointers
Global variables are allowed.
No global variable concept
Multiple inheritances-A class can have two or more super classes.
Multiple inheritances are attained in directly with the help of interface concept.
Supports operator overloading.
Does not support operator overloading.
ASCII- character set.
Unicode – character set


JDK EDITIONS
1- Java Standard Edition (J2SE) : J2SE can be used to develop client-side standalone applications or applets. It contains JDK and API for Windows applications. It is core part of Java.

2- Java Enterprise Edition (J2EE) : J2EE can be used to develop server-side applications such as Java Servlets and Java Server Pages. It contains API that are used for building large web centric distributed applications.

3- Java Micro Edition (J2ME) : J2ME can be used to develop applications for mobile devices such as cell phones and portable devices.

JDK (Java Development Kit)

1- javac : This is a Java compiler used to convert the source code (.java file) to byte code (.class file).
2- java : It is an interpreter used to execute the byte code.
3- appletviewer : This is used to run applets without browsers being invoked.
4- javap : This tool is used to disassemble the Java byte code to display the member variables and the methods.
5- javah : This tool creates the C-header file necessary to extend your Java code with the C language.
6- javadoc : This tool is used to create documentation (comment entries) for the given Java code.
7- jdb : Java debugger is used to debug local and remote files.
8- jar : This tool is used to pack the collection of Java classes into single archive file.

HISTORY OF JAVA


       In simple Java is an Object-oriented programming language created by Sun Microsystem in 1991. Java programming language is written by the Green Team lead by James Gosling along with the two person 'Mike Sheridan' and 'Patrick Naughton', while they were working at Sun Microsystems. Initially it was named oak Programming Language. The first version of Java aimed at programming home appliances which are controlled by a wide variety of computer processors. It was the advanced concept at that time. Currently Java is used in internet programming, games, mobile etc.

                                                 JAMES GOSLING
        The target of Java is to write a program once and then run this program in multiple operating system. The first publicly available version of Java (Java 1.0) was released in 1995. Sun Microsytem was acquired by the Oracle Corporation in 2010. 

        James Gosling was firstly named as "GREENTALK" and file extension was  .gt. After that it was called by oak. In 1995 Oak was renamed as Java. Java was started as a project called "Oak" by James Gosling in June 1991. Gosling's goals were to implement a virtual machine and a language that had a familiar to C, like notation but with greater uniformity and simplicity than C and C++. Java 1.0 made the promise of " Write once, Run anywhere".

Primary goals in the creation of the Java languages are :
1- It should use the object-oriented programming methodology.
2- It should allow the same program to be execute on multiple operating system.
3- It should be designed to execute code from remote sources securely.
4- It should be easy to use.
5- It should contain built-in support for using computer network.

        The Java syntax is similar to C++. Java is case sensitive. For example variable called 'Value' and 'value' are treated as different variables. 

JAVA VERSIONS
        The Java languages has undergone several changes since JDK 1.0. The Java Development Kit (JDK) is a software development environment used for developing Java applications and Applets. It include Java Runtime Environment (JRE), an interpreter/loader (Java), a compiler (Javac), an archiver (jar), a document generator (javadoc) and other tools in Java development.
        The Java languages has several changes since JDK 1.0 as well as numerous addition of classes and packages to the standard library. Versions of Java and released year are follows.
  • JDK Beta                -         1995
  • JDK 1.0                  -         1996
  • JDK 1.1                  -         1997
  • J2SE 1.2                 -         1998
  • J2SE 1.3                 -         2000
  • J2SE 1.4                 -         2002
  • J2SE 5.0                 -         2004
  • Java SE 6                -         2006
  • Java SE 7                -         2011
  • Java SE 8                -         2014
JDK EDITIONS
  • Java Standard Edition (J2SE) : J2SE can be used to develop client-side standalone applications or applets. It contains JDK and API for Windows applications. It is core part of Java.
  • Java Enterprise Edition (J2EE) : J2EE can be used to develop server-side applications such as Java Servlets and Java Server Pages. It contains API that are used for building large web centric distributed applications.
  • Java Micro Edition (J2ME) : J2ME can be used to develop applications for mobile devices such as cell phones and portable devices.

INCREASE iPHONE BATTERY LIFE



Every smart phone users facing lesser battery backup. Here I describe tricks to get more battery life for iPhone users. When iPhone’s battery is too low, you can use this trick by closing or disabling some functions of iPhone. These and the steps to closing them as follows.

1- Switch off the Wi-Fi
     Go Settings à Wi-Fi à off
2- Switch off Bluetooth
     Settings à Bluetooth à off
3- Deactivate 3G network mode
     Settings à General à Cellular à Enable 3G à off
4- Deactivate LTE network mode
    Settings à General à Cellular à Enable LTE à off
5- Deactivate Location Services
    Settings à Privacy à Location Services à off
6- Disable auto Brightness
    Settings à Brightness & Wallpaper à Auto Brightness à off
7- Disable Vibrate
     Settings à Sound à Vibrate on Ring & Silent à off
8- Disable fetching new Date
     Settings à Mail, Contact, Calendar à Fetch Date à off
9- Disable background Activity
     Settings à General à Background App Refresh à off

Other than disabling the services like Wi-Fi, Bluetooth, Vibrate etc. we should know the some other features of iPhone and battery general factors. Here describing one by one ……

TEMPERATURE
iPhone is designed to perform a wide range of temperature 16o to 22o C (62o to 72o F). Temperature has a big impact on device’s battery. If the temperature is higher than 35o C (95o F) the battery can be damaged permanently. That means the battery’s  backup capacity will reduce. Charging the device in high temperature can damage it further. When device is using in cold environment the battery capacity is going to reduce faster. Note, once the battery’s temperature is return to it’s normal operating range, it’s perform will return to normal. If you are using cases for iPhone you should notice the temperature when charging. If it generate excess heat, which can be effect the battery capacity. So if temperature is high when charging with the extra cases, you should remove the case and charge the phone.

ENABLE LOW POWER MODE
Low Power Mode is easy way to extend battery life of iPhone. Low Power Mode introduced with iOS 9. If iPhone’s battery level goes down 20% or less and turn on low Power Mode with one tap. You can enable it by:
            Settings à Battery à Low Power Mode
Low Power Mode reduce brightness, optimize device performance, Apps like Mail will not be download content in background, and features like AirDrop, Continuity and iCloud syn will be disabled. You can use functions like making and receiving phone calls, messages, accessing internet and more. When your phone charged again the Low Power Mode automatically switch off and your iPhone will perform normally.

DON’T PLUGGED IN ALL TIME
Leaving your devices plugged in at 100% is also harmful of battery life. Overcharging is not good for battery. Continues charging will damage the battery.

LOW SIGNAL OR NO NETWORK COVERAGE
If you are in a poor mobile coverage area or no network coverage area your iOS devices will searching for a better signal, this will affected your battery life. By turning in Airplane mode you can optimize your battery life. When activate Airplane mode you cannot make or receive calls.

BACKLIGHT
Setting the backlight to “always on” will be reduce battery life of iPhone’s. Use the backlight only when necessary.

UPGRADE WITH LATEST VERSION
For optimize battery life always make sure your device’s iOS is the latest version. If you’re connected to internet, will be automatically checks for software updates every week, but you still control when updated are installed. To confirm that you’re using the latest iOs, go to the Apple menu and choose Software Update.

STOP QUITTING APPS
To increase the battery life quit the apps we are not using. To quit an app, double tap the Home Button and swipe up on the apps you want to close.


MORE TRICKS WILL COME LATER, KEEP VISITING.


Blog Archive