Вы находитесь на странице: 1из 5

GIT

-SCM- source code management

-GIT (SCM tool)


-creates repository (place to store code)

-GitLab
-start on master branch
-branch ( series of commits)

-origin ( master , Alfonso_logrono(branch))

-local(master, alfonso_logrono())

Commands

-git (always type git)

-commit (a group of changes)

-push (pushes chnges to respository)

-add ( stages a file into a commit)

-rm (remove) (stages the deletion of a file into commit)

-status (status of the local repository with respect to what it thinks origin looks like)

-pull ( retrieves commits from origin)

-checkout (switches branches

-fetch (goes to origin and fetches everything not seen)

Git Flow

- git pull origin [branch]

[work]
- git status
- git add [.files]
- git status
- git commit –m “message”
- git status
- git pull origin [branch]
- git push origin [branch]

JAVA

Objected oriented programing language

Compiled

Platform independent ( java virtual machine)

Based on C

Oop- think about code in terms of objects

Class –blueprint of an object that defines the variables and the methods common to
all objects of a certain kind.

Object- state and behavior

Inheritance- the ability to inherit state and behavior of another class

Polymorphiysm –many shapes , ability to call something by one name and get different
things

Dynamic binding
is the process of linking procedure call to a specific sequence of code (method) at run-
time. It means that the code to be executed for a specific procedure call is not known
until run-time

Overloading
a class has multiple methods having same name but different in parameters,

Method overloading increases the readability of the program.


Overriding =polymorphism
Overriding is a feature that allows a subclass or child class to provide a specific
implementation of a method that is already provided by one of its super-classes or parent
classes. When a method in a subclass has the same name, same parameters or signature
and same return type(or sub-type) as a method in its super-class, then the method in the
subclass is said to override the method in the super-class.

Abstraction - allowing interaction with something without revealing implementation ( black


boxing)

Encapsulation - hidden data – hiding access- a way of controlling access to a member.

Public
Protected
[package]
private

Naming Conventions

-packages – reverse domain name

-PascalCase – classes, projects

-camelCase- variable,methods

-UPPER_CASE- constants

-lower_case-

-Snake_Case

ENTHUWARE
OCA-JP8 (1Z0-808)

1- foundation exam
primitive objects

int Character
char Short
short integer
long Long
float Float
double Double
byte Byte
Boolean Boolean

Access Modifiers – they have hierarchy

Scope – the range of execution in which a variable exits.


(an object which is out of scope does not exits)
(JAVA DOES NOT HAVE A GLOBAL SCOPE)
( no hierarchy)
- local or block scope (if its inside curly {} and no method its local)
- method scope
- instance or object scope (life time is lifetime of the object)
- class or static scope (main method is static)

static= closest thing to global in java


indicates that a field or method or block belongs to a class

java is pass by value for primitives and objects and also reference by value

Life Cycle of Java:


- Compilation
- Load
- Initialization
-

Control statements –controls the flow of execution


- For loop
- While/ do while
- Switch
- If/ else
- Break
- Continue
- return

Вам также может понравиться