-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjava notes.txt
More file actions
80 lines (32 loc) · 1.52 KB
/
Copy pathjava notes.txt
File metadata and controls
80 lines (32 loc) · 1.52 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
// In D drive, riun eclipse.exe
1. In local scope, we must have initialize the value before using it.
but for instance variable, you do not need for anythoimg
HW
static method and data members
why main static access non-access members
static is associated with data members and not local members
final - variable, method and class
Abstract -
1. An abstract class not instantiated, but reference can be created but it is null and eventually we cannot call non-abstract method on null
2. AC contain non abstract methods also
3. Abstract method do not have body
4. A class must be abstract if it has abstract method in it
5. We can bypass thye abstract method by making class as abstract
Package
organize the files
java.lang ===> java/lang
. used for directory hierachy
constructor provided by compiler is default & explicire;ly defined by user called explicit constructor
protected -> only by extends in child class
if throw is used within mwthod/constructor, method/constructor must used throws in case of checked exception
All exceptions are checked except RuntimeException
No need to catch runtime/unchecked exceptions and no need to use throws in unchecked exceptions
But checked exceptions must have to catch & need to throws from the methos
For databse connection:
1. Install databse
2. Install drivers of database
3. Write a java code to connect to the databse
Driver:
1. Know your driver
2. Register the driver
3.