Hello Friends this section will cover the core java tutorial which is enough to learn selenium automation tool.
For Video Tutorial : Move on Youtube Channel
Note : Select the playlist as per your need & move with number sequence
Video Tutorial for this article : CLICK HERE
History of Java?
Stack and heap in Java?
Why is Java platform independent ?
What is Java ?
Access Specifier in java
Data Types in Java
History of Java?
Java का पहला नाम 'Oak' इस पेड़ से रखा गया | ये रखने का मतलब 'James Gosling' और उनके सहकारी जहा पर Java के लिए काम करते थे, वहा पर 'Oak' का पेड़ था और 'Oak' ये कई देशों का राष्ट्रीय पेड़ भी है | इसी लिए 'Oak' ये नाम रखा गया |
ये 'Oak' नाम 1991 में रखा गया | लेकिन ये 'Oak' नाम पहले से ही 'Oak Technologies' का था |
उसके बाद 'Oak' का नाम बदलकर 'Java' रखा गया |
Java ये नाम रखने की एक ही वजह थी कि, जब 'James Gosling' और उनके सहकारी जब काम करते थे तब 'Java' नाम के बीज की Indonesian coffee पीते थे और 'Java' ये नाम काफी नया भी था | इसीलिए 'Java' नाम रखा गया |
अभी 2010 में Sun Microsystem ने 'Oracle' को ये बेच दी |
जब java का प्रारंभ हुआ तब उसका पहला नमूना '1995' में आया |
Introduction for Java/Core Java
Java ये दुनिया भर में बहुत ही प्रसिध्द programming Language है |
Java के लिए तीन प्रकार बनाये गए है |
Java SE (Standard Edition)
Java EE (Enterprise Edition)
Java ME (Micro Edition)
1. Java SE
Java SE ये Basic Programming के लिए इस्तेमाल किया जाता है, इसे Core Java भी कहा जाता है |
2. Java EE
Java EE ये Advanced Programminng है , इसे Advanced Java भी कहते है |
3. Java ME
Java ME ये mobile programming के लिए उपयुक्त है, लेकिन इसका android से कोई सम्बन्ध नहीं है |
Stack and heap in Java?
Where does everything live ?
Before we create an object it makes sense to understand where things live and how long they live for.
Two areas of memory to care about : one where objects live(The Heap) and the one where methods
invocations and local variables live(the stack).
What is JDK, JRE & JVM
The Java Development Kit (JDK) is one of three core technology packages used in Java programming, along with the JVM (Java Virtual Machine) and the JRE (Java Runtime Environment). It's important to differentiate between these three technologies, as well as understanding how they're connected:
The JVM is the Java platform component that executes programs.
The JRE is the on-disk part of Java that creates the JVM.
The JDK allows developers to create Java programs that can be executed and run by the JVM and JRE.
Developers new to Java often confuse the Java Development Kit and the Java Runtime Environment. The distinction is that the JDK is a package of tools for developing Java-based software, whereas the JRE is a package of tools for running Java code.
What happens when a JVM Starts Up?
1).When a JVM starts up, it gets a chunk of memory from the underlying OS and it uses it to run your java program.
2).How much memory dows it get? That depends on your version of the JVM(and on which platform).
3).Usually you won't have to care about how much menory it gets.
4).All objects are garbage-collectable on the heap.
Instance Variable
Instance varibales are declared inside a class but not inside a method. They represent each individual field that an object has.
Example :-
public class House
{
int table;
}
Local Variable
Local variables are declared inside a method, including method parameters. They are temporary, therefore they only live as long as
the method is on the stack --in other words, as long as method has not reached the closing curly brace.
Example :-
public void g(int x)
{
int i = x+3;
boolean b = true;
}
Memory management can be better understand by below image :-
Why is Java platform independent ?
First understand the concept of other language c/c++ processing
prepocessor use to process the source file and the lines which start from #(like include studio etc)
and now after preprocessing all the lines which starts from # will be replaces by
some code.
Now compiler will read this temporary file and will convert it in object file,
and then linker will come into existence and it will link library files to
object file and will create .exe file.
Remember : All the functions are coded with in library file and declaration is in header file.
Now in JAVA how the source file will be processed
The best feature of java is that it is platform independent.
Platform independent means writing codes in one operating System "Windows XP" and
executing that code on another platform 'Linux'.
OR
WORA : Write Once and Run Anywhere
Bytecode : Bytecode is the machine language of the Java Virtual Machine by using bytecode execution
java proves it's a platform Independent Language.
Source code : Actual java code
Java Compiler : Java Compiler convert the Source code to Byte code.
Java Virtual Machine (JVM) : JVM have Java Interpreter & JIT Compiler and JVM converts
byte code .class to executable code object file(.obj file), this .obj file
use to generate the Output.
Different types of JVM available on different operating System.
Using this JVM same .class file can run on various platforms.
What is meant by JIT Compiler ?
JIT Compiler is a compiler that converts program source code into native machine code
just before running the program.
It is Faster and more efficient to perform huge application.
What is java ?
C is procedure oriented language.
Java is object oriented Language.
Java was created by James Gosling from Sun Microsystems (Sun) in 1991.
The first publicly available version of Java (Java 1.0) was released in 1995.
Sun Microsystems was acquired by the Oracle Corporation in 2010.
In 2006 Sun started to make Java available under the GNU General Public License (GPL). Oracle continues this project called OpenJDK.
Java programming language was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as core component of Sun Microsystems' Java platform (Java 1.0 [J2SE]).
Sun Microsystems has renamed the new J2 versions as Java SE, Java EE and Java ME respectively. Java is guaranteed to be Write Once, Run Anywhere.
Java is:
•Object Oriented: In Java, everything is an Object. Java can be easily extended since it is based on the Object model.
•Platform independent: Unlike many other programming languages including C and C++, when Java is compiled, it is not compiled into platform specific machine, rather into platform independent byte code. This byte code is distributed over the web and interpreted by virtual Machine (JVM) on whichever platform it is being run.
•Simple: Java is designed to be easy to learn. If you understand the basic concept of OOP Java would be easy to master.
•Secure: With Java's secure feature it enables to develop virus-free, tamper-free systems. Authentication techniques are based on public-key encryption.
•Architectural-neutral :Java compiler generates an architecture-neutral object file format which makes the compiled code to be executable on many processors, with the presence of Java runtime system.
•Portable:Being architectural-neutral and having no implementation dependent aspects of the specification makes Java portable. Compiler in Java is written in ANSI C with a clean portability boundary which is a POSIX subset.
•Robust:Java makes an effort to eliminate error prone situations by emphasizing mainly on compile time error checking and runtime checking.
•Multithreaded: With Java's multithreaded feature it is possible to write programs that can do many tasks simultaneously. This design feature allows developers to construct smoothly running interactive applications.
•Interpreted:Java byte code is translated on the fly to native machine instructions and is not stored anywhere. The development process is more rapid and analytical since the linking is an incremental and light weight process.
•High Performance: With the use of Just-In-Time compilers, Java enables high performance.
•Distributed:Java is designed for the distributed environment of the internet.
•Dynamic: Java is considered to be more dynamic than C or C++ since it is designed to adapt to an evolving environment. Java programs can carry extensive amount of run-time information that can be used to verify and resolve accesses to objects on run-time.
Access specifier in Java
Public , Private & protected Keywords :
•private - Only the current class will have access to the field or method.
•protected - Only the current class and subclasses (and sometimes also same-package classes) of this class will have access to the field or method.
•public - Any class can refer to the field or call the method.
Private | Non modifier | Protected | Public | |
---|---|---|---|---|
Same package sub class | No | Yes | Yes | Yes |
Same package non sub class | No | Yes | Yes | Yes |
Different package subclass | No | No | Yes | Yes |
Different package non subclass | No | No | No | Yes |
Why Java is platform independent language:
Javac – compiler that converts source code to byte code.
JVM- interpreter that converts byte code to machine language code.
As we know java is both compiler & interpreter based language. Once the java code also known as source code is compiled, it gets converted to native code known as BYTE CODE which is portable & can be easily executed on all operating systems. Byte code generated is basically represented in hexa decimal format.
After compilation, the interpreter reads the generated byte code & translates it according to the host machine. . Byte code is interpreted by Java Virtual Machine which is available with all the operating systems we install. so to port Java programs to a new platform all that is required is to port the interpreter and some of the library routines.
Source code -> javac ->Universal byte code
Universal byte ->jvm/java -> execute them on a particular machine.
Data Types in Java:
Based on the data type of a variable, the operating system allocates memory and decides what can be stored in the reserved memory.
There are two data types available in Java:
• Primitive Data Types
• Reference/Object Data Types
Primitive Data Types:
byte: • Byte data type is an 8-bit signed two's complement integer.
• Minimum value is -128 (-2^7)
• Maximum value is 127 (inclusive)(2^7 -1)
• Default value is 0
short: • Short data type is a 16-bit signed two's complement integer.
• Minimum value is -32,768 (-2^15)
• Maximum value is 32,767 (inclusive) (2^15 -1)
int: • Int data type is a 32-bit signed two's complement integer.
• Minimum value is - 2,147,483,648.(-2^31)
• Maximum value is 2,147,483,647(inclusive).(2^31 -1)
long: • Long data type is a 64-bit signed two's complement integer.
• Minimum value is -9,223,372,036,854,775,808.(-2^63)
• Maximum value is 9,223,372,036,854,775,807 (inclusive). (2^63 -1)
float: • Float data type is a single-precision 32-bit IEEE 754 floating point
double: • double data type is a double-precision 64-bit IEEE 754 floating point.
boolean: • boolean data type represents one bit of information.
• There are only two possible values: true and false.
char: • char data type is a single 16-bit Unicode character.
Reference Data Types:
• Reference variables are created using defined constructors of the classes. They are used to access objects. These variables are declared to be of a specific type that cannot be changed.
Tags :
I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details.
ReplyDeleteselenium training in chennai|
selenium training in bangalore|
Core Java is the basic knowledge and pre-requisites to learn Selenium. Thank you for your guidance. keep Share more useful post.
DeleteBest DevOps Training in Chennai
Best DevOps Course in Chennai
I‘d mention that most of us visitors are endowed to exist in a fabulous place with very many wonderful individuals with very helpful things.
ReplyDeletehadoop training in bangalore
Great site for the post and I am seeing the most of contents have useful for my Career. Thanks to such a useful information.
ReplyDeleteJava Training in Chennai
Java Course in Chennai
I accept there are numerous more pleasurable open doors ahead for people that took a gander at your site.
ReplyDeleteJava Training in Marathahalli
I have to voice my passion for your kindness giving support to those people that should have guidance on this important matter.
ReplyDeletehadoop training in bangalore
Thanks for one marvelous posting! I enjoyed reading it; you are a great author. I will make sure to bookmark your blog and may come back someday. I want to encourage that you continue your great posts, have a nice weekend!
ReplyDeleteDevops Training in Chennai
I wish to indicate because of you only to bail me out of this specific trouble.As a consequence of checking through the net and meeting systems that were not beneficial, I thought my life was finished.
ReplyDeletenebosh igc certificate course in chennai
I have to voice my passion for your kindness giving support to those
ReplyDeleteThanks for one marvelous posting! I enjoyed reading it; you are a great
author. And i suggest for Java Training in chennai Visit Here: Best Java Training Institute in Chennai
I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.fire and safety courses in chennai
ReplyDeleteIt is better to engaged ourselves in activities we like. I liked the post. Thanks for sharing.
ReplyDeleteJava training in Pune
Java interview questions and answers
Java training in Chennai | Java training institute in Chennai | Java course in Chennai
Java training in Bangalore | Java training institute in Bangalore | Java course in Bangalore
Nice post. By reading your blog, i get inspired and this provides some useful information. Thank you for posting this exclusive post for our vision.
ReplyDeleteData Science training in Chennai | Data Science Training Institute in Chennai
Data science training in Bangalore | Data Science Training institute in Bangalore
Data science training in pune | Data Science training institute in Pune
Data science online training | online Data Science certification Training-Gangboard
Data Science Interview questions and answers
Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.
ReplyDeletepython course in pune
python course in chennai
python course in Bangalore
I am so proud of you and your efforts and work make me realize that anything can be done with patience and sincerity. Well I am here to say that your work has inspired me without a doubt.
ReplyDeleteBest Devops Training in pune
excel advanced excel training in bangalore
Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
ReplyDeleterpa training in Chennai | rpa training in bangalore | best rpa training in bangalore | rpa course in bangalore | rpa training institute in bangalore | rpa training in bangalore | rpa online training
Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.
ReplyDeleteAWS Training in Bangalore |Best AWS Training Institute in Bangalore BTM, Marathahalli
AWS Training in Chennai | AWS Training Institute in Chennai Velachery, Tambaram, OMR
I was recommended this web site by means of my cousin. I am now not certain whether this post is written through him as nobody else recognise such precise about my difficulty. You're amazing! Thank you!
ReplyDeleteangularjs-Training in velachery
angularjs-Training in pune
angularjs Training in bangalore
angularjs Training in bangalore
angularjs Training in btm
angularjs Training in electronic-city
This is a nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
ReplyDeleterpa training in bangalore
best rpa training in bangalore
rpa training in pune
Great Article… I love to read your articles because your writing style is too good,
ReplyDeleteits is very very helpful for all of us and I never get bored while reading your article because,
they are becomes a more and more interesting from the starting lines until the end.
Java training in Bangalore
It would have been the happiest moment for you,I mean if we have been waiting for something to happen and when it happens we forgot all hardwork and wait for getting that happened.
ReplyDeleteSelenium training in Chennai
Selenium training in Bangalore
Selenium training in Pune
Selenium Online training
Selenium training in bangalore
Thanks for sharing this blog post. it gives more useful information about java.
ReplyDeletejava classes in bangalore
Thank you for that valuable post. Fresher’s have struggle to learn java in this post guide that students and give more extended knowledge of Java.
ReplyDeleteCore Java Training In Bangalore
Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
ReplyDeletemicrosoft azure training in bangalore
rpa training in bangalore
best rpa training in bangalore
rpa online training
Thanks to proceeding wonderful guidance about core java. Also, I have realized how this is supportive of selenium development.
ReplyDeleteCore java Training in Bangalore
Hi Admin,
ReplyDeleteI had already bookmarked this blog while writing this. Good Blog with very interesting way of explaining things. Thanks for sharing with us. Really appreciated.
Salesforce Training in Bangalore | Salesforce Course in Bangalore | Salesforce Developer Training in Bangalore | Salesforce Developer Course in Bangalore
Hadoop is a tool utilized broadly in big data analysis, encouraged with the system of PCs sorted out to tackle issues including an enormous measure of information and calculation. Get Hadoop Training in Bangalore with certification by the assistance of specialists and get complete knowledge over the technology.
ReplyDeleteHadoop Training in Bangalore | Hadoop Course in Bangalore
I’m experiencing some small security issues with my latest blog, and I’d like to find something safer. Do you have any suggestions?
ReplyDeletesafety course in chennai
nebosh course in chennai
Thank you! It was a great help. What I most loved about it was how you presented the information. Brilliant and helpful.Universal Informatics provides the best JAVA TRAINING IN INDORE
ReplyDeleteHave you been thinking about the power sources and the tiles whom use blocks I wanted to thank you for this great read!! I definitely enjoyed every little bit of it and I have you bookmarked to check out the new stuff you post
ReplyDeleteJava training in chennai
I always enjoy reading quality articles by an individual who is obviously knowledgeable on their chosen subject. Ill be watching this post with much interest. Keep up the great work, I will be back
ReplyDeleteAdvanced Java certification training
Salesforce certification training
Hey Nice Blog!! Thanks For Sharing!!! Wonderful blog & good post. It is really very helpful to me, waiting for a more new post. Keep Blogging!Here is the best angularjs online training with free Bundle videos .
ReplyDeletecontact No :- 9885022027.
SVR Technologies
Your articles really impressed for me,because of all information so nice.devops Training in Bangalore
ReplyDeleteThese provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post.Amazon web services Training in Bangalore
ReplyDeleteI gathered a lot of information through this article.Every example is easy to undestandable and explaining the logic easily.python training in bangalore
ReplyDeleteVery useful and information content has been shared out here, Thanks for sharing it.selenium training in bangalore
ReplyDeleteThis is really an awesome post, thanks for it. Keep adding more information to this.mulesoft training in bangalore
ReplyDeletedata science course bangalore is the best data science course
ReplyDeleteWow it is really wonderful and awesome thus it is veWow, it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot.
ReplyDeleteoracle dba training in bangalore
oracle dba courses in bangalore
oracle dba classes in bangalore
oracle dba training institute in bangalore
oracle dba course syllabus
best oracle dba training
oracle dba training centers
This is the exact information I am been searching for, Thanks for sharing the required infos with the clear update and required points. To appreciate this I like to share some useful information.
ReplyDeleteperl training institutes in bangalore
perl training in bangalore
best perl training institutes in bangalore
perl training course content
perl training interview questions
perl training & placement in bangalore
perl training center in bangalore
It is very good and useful for students and developer.Learned a lot of new things from your post Good creation,thanks for give a good information at sap crm.
ReplyDeletemysql dba training in bangalore
mysql dba courses in bangalore
mysql dba classes in bangalore
mysql dba training institute in bangalore
mysql dba course syllabus
best mysql dba training
mysql dba training centers
I have to voice my passion for your kindness giving support to those people that should have guidance on this important matter.
ReplyDeletepega training institutes in bangalore
pega training in bangalore
best pega training institutes in bangalore
pega training course content
pega training interview questions
pega training & placement in bangalore
pega training center in bangalore
Excellent post for the people who really need information for this technology.
ReplyDeletesql server dba training in bangalore
sql server dba courses in bangalore
sql server dba classes in bangalore
sql server dba training institute in bangalore
sql server dba course syllabus
best sql server dba training
sql server dba course syllabus
best sql server dba training
sql server dba training centers
Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.
ReplyDeletedata science course
data science interview questions
Your articles really impressed for me,because of all information so nice
ReplyDeleteAngularJS Training in Pune | RPA Training in Pune | Devops Training in Pune
Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites!
ReplyDeletebusiness analytics course
data analytics courses
data science interview questions
data science course in mumbai
Attend The Data Science Courses Bangalore From ExcelR. Practical Data Science Courses Bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Science Courses Bangalore.
ReplyDeleteExcelR Data Science Courses
Data Science Interview Questions
ExcelR Business Analytics Course
We are located at :
Location 1:
ExcelR - Data Science, Data Analytics Course Training in Bangalore
49, 1st Cross, 27th Main BTM Layout stage 1 Behind Tata Motors Bengaluru, Karnataka 560068
Phone: 096321 56744
Hours: Sunday - Saturday 7AM - 11PM
Location 2:
ExcelR
#49, Ground Floor, 27th Main, Near IQRA International School, opposite to WIF Hospital, 1st Stage, BTM Layout, Bengaluru, Karnataka 560068
Phone: 070224 51093
Hours: Sunday - Saturday 7AM - 10PM
ReplyDeleteWhatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly, but it’s no need to do it, because you have explained the concepts very well. It was crystal clear.i also want to inform you the best salesforce cpq training videos . thankyou . keep sharing..
Nice blog,I understood the topic very clearly,And want to study more like this.
ReplyDeleteData Scientist Course
I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it.
ReplyDeletemachine learning course
artificial intelligence course in mumbai
This is a wonderful article, Given so much info in it, Thanks for sharing. CodeGnan offers courses in new technologies and makes sure students understand the flow of work from each and every perspective in a Real-Time environmen python training in vijayawada. , data scince training in vijayawada . , java training in vijayawada. ,
ReplyDeleteImpressive! I finally found great post here. Nice article on data science . It's really a nice experience to read your post. Thanks for sharing your innovative ideas to our vision.
ReplyDeleteData Science Course
Data Science Course in Marathahalli
Data Science Course Training in Bangalore
Mmm.. good to be here in your article or post, whatever, I think I should also work hard for my own website like I see some good and updated working in your site. data analytics course in surat
ReplyDeleteThanks for sharing this valuable information, we also provide instagram video download and,
ReplyDeletereally appreciate your hard work and good research that help us in for of your good valuable article. Keep updating us with your awesome content.