-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIntro.txt
More file actions
168 lines (139 loc) · 6.03 KB
/
Intro.txt
File metadata and controls
168 lines (139 loc) · 6.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
JAVA:
Father: James Arthur Gosling aka Dr. Java (1955)
Principle: Simple, Robust, Portable, Platform-independent, Secured,
High Performance, Multithreaded, Architecture Neutral, Object-oriented, Interpreted, and Dynamic
Etymology: Java is an island of Indonesia where first coffee was produced(Java Coffee)
Paradigm: Generic, Object-oriented, Imperative, Reflective
Java character set: (65,556)
> Unicode
A: 65
B: 66
A(devnagri): 400
Aa(devnagri): 401
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-Java reserved words:-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
keywords reserved literals
___________|____________ (true, false, null)
| |
Used keywords unused keywords
(goto, const)
*-*-*-*-*-*-*-*-*-*-Keywords related to data types-*-*-*-*-*-*-*-*-*-*
-> byte -> -128 TO 127 (inc)
-> int -> 2147483647 TO 2147483647 (inc) [(2^31) TO (2^31)-1]
-> float -> 3.40282347x10^(38) TO 1.40239846x10^(-45) (inc)
-> long -> 9,223,372,036,854,775,807 TO 9,223,372,036,854,775,807 (inc) [(2^63) TO (2^63)-1]
-> char -> '\u0000' OR 0 TO '\uffff' OR 65,535 (inc)
-> Double -> 1.79769313486x10^(308) TO 4.94065645841x10^(-324) (inc) {default val for decimal values}
-> boolean -> true OR false
-> short -> -32,768 TO 32,767 (inc)
*-*-*-*-*-*-*-*-*-*-Keywords related to control structure-*-*-*-*-*-*-*-*-*-*
if
else
break
continue
while
do
for
switch
case
default
*-*-*-*-*-*-*-*-*-*-Keywords related to modifiers-*-*-*-*-*-*-*-*-*-*
public
private
protected
abstract
final
static
transient
volatile
synchronized
*-*-*-*-*-*-*-*-*-*-Keywords related to classes-*-*-*-*-*-*-*-*-*-*
class
interface
enum
*-*-*-*-*-*-*-*-*-*-Keywords related to inheritance-*-*-*-*-*-*-*-*-*-*
extends
implements
*-*-*-*-*-*-*-*-*-*-Keywords related to package-*-*-*-*-*-*-*-*-*-*
package
import
*-*-*-*-*-*-*-*-*-*-Keywords related to exceptional handelling-*-*-*-*-*-*-*-*-*-*
try
catch
throw
finally
*-*-*-*-*-*-*-*-*-*-Keywords related to references-*-*-*-*-*-*-*-*-*-*
this
super
*-*-*-*-*-*-*-*-*-*-NOTE-*-*-*-*-*-*-*-*-*-*
goto is unused keyword because
goto makes program unstructured
goto never lets program to stored in cache
if goto is used in program then it will not work with cache memory
*-*-*-*-*-*-*-*-*-*-Identifiers-*-*-*-*-*-*-*-*-*-*
> Identifiers are user defined words.
> In Java, Identifiers contain alphabets, digits, and two special char ($, _)
> Rules for naming identifiers :
> Class name should start with capital letter (PascalNotation)
> If class name have multiple words, then saparate with capital letters
> Variable names should start with small letters (var)
> If variable name has multiple words, then saparate with capital letter (varName)
> Method name should start with small letter
> If method name has multiple word then saparate with cpital letters
> Constant name must be given in capital letters
> If constant name has multiple word, saparate with underscore(_)
*-*-*-*-*-*-*-*-*-*-Data Type-*-*-*-*-*-*-*-*-*-*
Data type reserve memory for data. They define two things:
> Size
> Type
Datatype in Java
-> byte -> -128 TO 127 (inc) -> 1 byte
-> short -> -32,768 TO 32,767 (inc) -> 2 bytes
-> long -> 9,223,372,036,854,775,807 TO 9,223,372,036,854,775,807 (inc) [(2^63) TO (2^63)-1] -> 8 bytes
-> int -> 2147483647 TO 2147483647 (inc) [(2^31) TO (2^31)-1] -> 4 bytes
-> float -> 3.40282347x10^(38) TO 1.40239846x10^(-45) (inc) -> 4 bytes
-> char -> '\u0000' OR 0 TO '\uffff' OR 65,535 (inc) -> 2 bytes
-> Double -> 1.79769313486x10^(308) TO 4.94065645841x10^(-324) (inc) {default val for decimal values} -> 8 bytes
-> boolean -> true OR false -> 1 bit
key: (inc: included)
*-*-*-*-*-*-*-*-*-*-NOTE-*-*-*-*-*-*-*-*-*-*
> In Java, there is no signed, unsigned data type because by default here signed is there
> Size of data type does not change from one OS to another OS
> (byte, short, int, long) belongs to integer type
> (Double) belongs to float type
> In float, 7 decimal digits after decimal point are displayed
> In Double, 15 decimal digits after decimal point are displayed
> (char) belongs to character type
> In Java, size of char is 2 byte; because of this, it supports large range of characters
> In Java, we can use 18 international languages because of large range of characters
> (boolean) belongs to boolean type
> It is used for storing logical values, i.e. either true or false.
> Java Boolean datatype takes 0 byte of main memory space because it is implemented with general purpose register
which allows to store 1 bit of information where (1 for true) and (0 for false)
Default values of datatypes (category wise)
integer === 0
float === 0.0
character === null
boolean === false
Type of Applications
Standalone Applications
These are applications which run on the local disk and whose results are not sharable.
All the applications of system software are example of standalone applications.
Distributed Applications
These are the applications which run in the context of browser/server and whose
results are sharable across the globe.
E.g.: google.com, gmail.com, yahoo.com, Zoom app
History of Java
Java is one of the programming language created for development of distributed applications
Java software is developed at SunMicro Systems by James Arthur Gosling
Java development was started in the year 1990 and completed in the middle of 1991
Guardians of Java
SunMicro System has handed over entire rights of Java to Oracle
In the real industry, Java software is present in 3 categories:
> J2SE (Java to Standard Edition)
used for developing client side applications
> J2EE (Java to Enterprise Edition)
used for developing server side applications
> J2ME (Java to Micro Edition)
used for developing mobile applications
NOTE
Java software is available in the form of JDK (Java Development Kit)