I am currently taking Java for mobile applications class. I am going to be using this repo as a reference for my learning and notes. I also plan to take this along Swift just out of curiosity.
Java is a high level, general purpose, class based, and powerful programming language that can run all platforms that support Java without recompilation and hence the notion Write Once, Run Everywhere(WORA)
.
Java programs are usually compiled to bytecode
that ca run on any Java Virtual Machine(JVM) regardless of the underlyining platform/machine.
Here are some few facts about Java language:
- Designed by James Gosling, a.k.a Dr. Java and currently owned by Oracle.
- Designed in 1995
- Write once, run everywhere
- Java Syntanx are similar to C/C++/C#
- Java uses comments similar to C++:
//...This is a comment...//
,/*...This is a comment...*/
,/**...This is a comment...*/
. - Java programs filename extensions:
.java
,.class
,.jar
. - Java is one of the popular programming language, most notable in backend server development
- Java is open source and free.
- Java is secure, fast, and powerful.
- Great community support(about 9 millions developers)
- Former called
Oak
, then changed toGreen
, then finally toJava
. - Java programms can run on Windows, Mac, Linux, Raspiberry pie...
public class Main {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Java is a cross-platform programming language.
It is used for building:
- Mobile applications(Android apps)
- Desktop applications
- Web applications
- Web and applications servers
- Gaming applications
- Distributed applications
- IoT(Internet of Things) Applications
- Simple to learn, object oriented**, and familiar
- Robust and secure
- Portable and cross platform(architecture-neutral)
- Fast execution
- Interpretable(no need to compile first, just like Python)
** Object Oriented Programming(OOP) is a programming paradigm or style that organizes a software design around data(or objects) and well defined interfaces instead of functions and logics. Object is instance of clsss and it contains data and function.
** Java OOPs concepts are: Abstraction,encapsulation, inheritance, and polymorphism. The main goal of these concepts is to implement real world entities in programs.
- Hello World
- Java Platforms: Java JVM, Java RE, JDK
- Java Syntax Basics
- Java Variables
- Java Data Types
- Java Strings
- Java Operators
- Java Booleans
- Java Math
- Java Arrays
- Java Control Structures: If..Else, Switch, While Loop, For Loop, Break/Continue