#53 Packages in Java

preview_player
Показать описание
Check out our courses:

Coupon: TELUSKO10 (10% Discount)

Coupon: TELUSKO20 (20% Discount)

Udemy Courses:

For More Queries WhatsApp or Call on : +919008963671

In this lecture we are talking about package:
-- what is package ?

-- you are using music, documents, video and you need to store in a different folder as per their use
to avoid confusion (Similarly in java for storing class, enum , annotations, sub package we are using concept of package).

-- in song folder you have multiple songs folder e.g sad songs, romantic songs, rocking song for that we can create sub
folders inside folders of songs ,in package also we can create package inside package

-- you can structure in which we put similar types of codes in one folder, this concept in java is known as package.

-- for creating a package we can use a keyword called package at a top of code and code file is in that package.

-- if we create database code then you can write it in separate package i.e db package
-- if two java file in different package then you need to import class of one package to different package.

suppose that tools package has two files

and db package has two files

for that we need to import AdvCal class from tools package

package db; //Demo in db folder so that we need to mention
import tools.AdvCal; // without importing we can get error in creating object

class Demo{
public static void main(String []args){
AdvCal obj =new AdvCal();
}
}

-- there are many package provided by oracle.
java is main package and util is sub package inside main package and from this we can import ArrayList class.
java is package and util is subpackage of java then from util package we can import ArrayLis.t


-- when you create library then you need to create package and package should be unique name.
-- go to mvn repository
-- one way to building library reversing the domain name

More Learning :

Donation:
PayPal Id : navinreddy20
Рекомендации по теме
Комментарии
Автор

I get addicted to this man just bcoz of his teaching...the real java man ♂️ amazing way of explanation thank you sir✨

pintu_patil
Автор

This entire Telusko Java mix is so useful and along with code snippets we get a real picture. Thanks Navin for giving this to all students and engineers. :)

jayasharma
Автор

Very useful for junior but for seniors also in order to refresh in mind Java basics.

lesiamakhova
Автор

this is the type of teaching that every one want .

vigneshrebba
Автор

This is the type of explanation I needed a lot. Sir hats off to you. Your way of teaching is very simple and effective. Just by listening automatically everything got stored in my mind.

mihirpawar
Автор

Million Thanx for this video. My mind was totally cracking trying to get this structure. ❤❤❤

thaimilamonegabolander
Автор

Thank you so much! You are far far far better than the teacher at my college!!

krisinfo
Автор

sir u r absolutely amazing ur sense of teaching is just boom✌

divya.d
Автор

You are an amazing teacher sir, hats off to you and your style of teaching

swastithakur
Автор

Very useful for junior learn Java basics. Thank you very much sir...!!

sadeepadilshan
Автор

I have recently started learning java on NPTEL please make a video on Java applets and share how they are usefull over other javascript libraries and their use cases

bhirejayeshnanaji
Автор

I love your way of teaching. can't just simply say thanks to you.

ChinnaChinna-py
Автор

Most underrated mentor!!🙇
Thank you Sir!

pratikhadawale
Автор

I am happy sir, i learn amazing thing.

ajayofficial
Автор

thanks for the comprehensive explanation !

rabotkx
Автор

thank you so much sir! this really helped :)

umeshkashyap
Автор

Tq so much sir this video helped me a lot🤧

vishwarajugayathrivardhini
Автор

Revising this for my 3rd switch of career 😅

vinitsawant
Автор

how perfect u r sir😊😊😊😊tq for teaching us

Manisha_
Автор

very clear of package ❤. Thank u teacher 🙏🏻

Sok_Masterly