
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
The lecture deals with download and installation of jdk (Java Development Kit) from the official Oracle Site.
In this tutorial, download and installation of Eclipse framework is shown by making use of installation of package(Eclipse IDE for Java EE Developer).
This tutorial deals with the concept of keywords in Java. Keywords are special entities which are predefined in Java. These words cannot be used as identifier. Out of the 50 keywords 48 are currently in use (const and goto not in use). The rules associated with keywords will be covered in the video.
PS:- true false null might seem keywords but aren't. More on this topic ahead of the tutorial.
This lecture contains configuration of eclipse environment to set up for our first Java program to print 'Hello World!'.
Variable is a chunk of memory that can store information. Each piece of information (variable) has a data type associated to it. The data type has effect on the operations that we can perform on the specific variable. Variables of certain data types can deal with variable of the same type unless they are manipulated (typecasting). Such details will be studied further.
The manipulation of two variables having the same datatype is shown. The variables can be modified with help of any constant or otherwise with the help of same datatype. Issues such as case-sensitivity and order of execution of statements is shown here.
This tutorial describes the integer datatype and the similar types of
the datatype with couple of differences.Various operations likes the maximum
and minimum are shown. The following primitive datatypes are discussed are as follows.
1.byte(memory->(1 byte,8 bit),range->(-128,127))
2.int (memory->(4 bytes,32 bits),range->(-2^31,2^31))
3.short(memory->(2 bytes,16 bits),range->(-2^15,2^15))
4.long(memory->(8 bytes,64 bits),range->(-2^63,2^63))
The tutorial describes the float and the double primitive datatypes. Mostly used while dealing with decimals. The float datatype occupies 4 bytes hence will have a range from -2^31 to 2^31.It has single-precision(6 decimals)hence it is not used for complex calculation. For that purpose double is used. The double occupies 8 bytes and hence double precision(12 decimals).This also outlines the various techniques of implementing the above datatypes.
This deals with the boolean datatype. The boolean data type has only two possible values: true and false. This data type is used for simple flags that track true/false conditions. This data type represents one bit of information, but its memory constant isn't precisely defined. Char datatype is 16 bit unicode character. It has a lower limit of '\u0000' (0) and a highest value of '\uffff' (or 65,535) both inclusive.
This session deals with the Strings. Strings represent character strings. The various rules associated with string are stated in addition with some operations. Also an introduction to typecasting is given (which is conversion between the datatypes). Discussions on the same are continued in upcoming lectures.
This lecture deals with typecasting from basics to advanced. The conversion from one datatype to other is described here. This tutorials covers both types of typecasting namely explicit and implicit typecasting. Implicit typecasting is automatically done by compiler to convert datatypes with large memory space to short memory space. The other (Explicit typecasting)has to be manually declared. It covers all the rules for conversion for typecasting.
This are all the source codes of the programs discussed so far in the section. At the end of each section, we have presented the same.
This lectures deals with basic operators in java as the addition, subtraction, multiplication and the division operators.(+,-,*,/). In addition to this Operators it also contains information about increment(++) operator which increases the value by 1 as contrast to the decrement operator(--) which does exactly the opposite.Modulo operator(%) gives the remainder of two numbers. After this tutorial you will be able to use this operator efficiently in your program.
This tutorials deals with the 'if' condition. The if condition verifies the basic yes or no condition. If this given condition is satisfies the statements inside the if cases are executed. Or if false the 'else' case is executed(if written or defined). The scope of the if statement and the implementation of this will be discussed further.
This tutorial is the continuation of the lecture above. In the lecture the implementation of if condition is shown.
This lecture deals with more cases which could be used in if-else condition. The use of &&(and) operator and ||(or) operator for condition checking is used along with !(not) or negation operator. At the end of the lecture, we will be able to use these in our programs efficiently.
This tutorial deals with three operands we use the ternary operator. It can be used as a single line substitution for the given if-else condition. We can also use it to replace the switch. The basic syntax of the ternary operator along with the rules are shown in following. At the end of the lecture, we will be able to use these in our programs efficiently.
This tutorial deals with assignment operators in java which provides an easier syntax for assigning a result of arithmetic or bitwise operator. The basic syntax along with the use of 4 assignment operators which are ([+=, -=, *=, /=, %=]) is shown in the program.
In this tutorial, we deal with the advanced details of the if-else condition. The tutorial highlights the errors committed while using if condition also gives insight into the scope of the if, else and if else statements. The nested-if condition also described here with various cases and code blocks. At the end of the tutorial, we have a better understanding of if conditions.
At the end of each section, we provide you with the source code of all the programs implemented in the section. The tutorial for extracting and using the files have been discussed earlier in the previous section.
The switch case is a more advanced version of else and if-else conditions. The switch case is a multi-way branch statement. We can assign n number of conditions for n cases in short as a contrast to the else and if else. It also doesn't require code blocks. There are various further uses and details which will be seen further.
This tutorial contains more in-depth information about the switch. The switch condition can only make use of int, char and enum datatype. (enum is to be seen further- It is a user-defined datatype). The switch conditions have a variety of features as such multiple conditions for the same output. The implementation of the char datatype in the switch case is also shown here.
This tutorial about switch contains information about implementing the switch with String datatype. Also working with functions with String to manipulate the outcome of the program and apply various conditions for the same output is shown.
This tutorial deals with the implementation of for loop. The for loop deals with executing the code continuously over a given range of values specified by the user. The further detailed implementation is shown in the next lecture along with implementation for prime numbers.
This tutorial deals with the implementation of a while loop in java. The while loop in java is same as a for loop and used to execute a statement repeatedly until it satisfies the given Boolean condition. It also deals with the condition of an infinite loop which can arise in the while loop.
This tutorial deals with the do-while condition in the Java programming. In this tutorial, the basic difference in the do while, while and the for the loop is shown. The do-while loop is a variant of while loop which will execute for at least one-time even if the condition is false. Hence this program will explain the concepts of the do-while loop in java.
This tutorial deals with the multi-variable implementation of for loop and the while loop. The implementation of these loops regarding a single the boolean condition was discussed earlier. By the completion of this section, users will get a complete reference about various types of loops and their variants along with their implementation.
Break
In some situations, we want to jump out of a loop instantly, without wanting
to get back again to the loop. The keyword ‘break’ helps us in doing so.
The only major difference between the break and continue being that the
'break' exits the loop once the keyword is encountered and 'continue' as
the name says continues to return the pre-conditional statements till it is true.
Continue
In some situations, we want to take the control of the program to the beginning
of the loop, bypassing the statements inside the loop, which have not yet been
executed. The keyword 'continue' allows us to do this. When continue is
encountered inside any loop, control automatically passes to the beginning of
the loop. A continue is usually associated with an if.
This tutorial deals with an advanced variant of for loop. The use of nested loops arise when we need an iteration over repeated conditions. For example any operation on a matrix such as a matrix multiplication would require the user to iterate through rows and columns separately. The tutorial also implements with the program of pattern printing which is the basic question in competitive programming.
This tutorial is a continuation of the previous lecture which deals with the nested loops. In this tutorial, students are expected to print the required pattern which requires them to have a basic knowledge of nested loops.
At the end of each section, we provide you with the source code of all the programs implemented in the section. The tutorial for extracting and using the files have been discussed earlier in the previous section.
Methods are blocks of code which can be used repeatedly by the programmer to reduce the complexity (length) of the code. There are various types of methods which are differentiated by the parameters passed or return type etc. In this tutorial parameterized methods and non-parameterized methods, both are explained. Parameterized methods are which take any arguments (variables of any data type). These can be passed by reference or value. This will be studied further in the course.
This tutorial deals with parameters and returns types of the methods. The parameters are the variables or arguments passed to the function to be used in our program. The return type is the data type of the variable that is returned to the main function (it is not mandatory since the function can also be invoked from an external function).
This tutorial deals with the concept of method overloading. Method overloading in simple words is a set of methods which have the same name but should have the at least one of the following parameters which are unique to the method. The parameters are return type, parameters passed and the sequence of parameters. If methods have any one of the above features which is unique to them then multiple methods can share the same name.
The above-given properties are verified by certain example by taking a different number of parameters and also different datatypes for the same method name.
At the end of each section, we provide you with the source code of all the programs implemented in the section. The tutorial for extracting and using the files have been discussed earlier in the previous section.
In Java, there are certain rules followed by various programmers around the world in order to make the code readable for the users. Hence there are some specifications followed, for example, naming the variable in Camelcase, package names in lowercase etc. These are not mandatory but as we go further it'll make our work easier if we adapt to these conventions and interact with fellow Java developers.
Code blocks have been discussed earlier. A code block is a piece of code that is surrounded by curly braces '{}' which mark the start and end of the piece of code.
Indentation is the proper arrangement of the code by tabs or spaces such that the code is readable. It could also be done automatically by the eclipse editor which is shown in the video.
In addition, some tips and tricks about the editor are discussed here.
Literals are values assigned to variables. The types of literals and their representation are described in the provided material.
In simple words class is a user-defined blueprint which contains user-defined variables and methods which can be accessed by entities called as objects of the class. The methods and variables in the class are collectively known as the members of the class. The class is an imaginary template for the object. The class is usually used for defining the exact form and nature. The object operated on the data. These are used for depicting real-life object and scenarios.
This tutorial deals with the getters and setters assigned to a variable. This can be used especially when the variables are private (scope) that is they cannot be accessed outside from the class in which they are defined.
The property of getters and setters is a very useful one in java. But it is a very lengthy task to define each getter and setter separately or even in a single getter and setter.
Due to which Eclipse allows default options of automatically creating getters and setters for the programmers by a simple shortcut which is further described in the program.
In this tutorial, basic functions are implemented in a class. As discussed earlier the class implements a real-life scenario such as the example above which depicts certain conditions that apply to a Car which is further explained here.
The tutorial deals with the concept of constructors. Constructors are chunks of code which are used to initialize the variables automatically in the class to any random default value.
A constructor initializes an object as soon as it is created. It is similar to a method. The constructor can be created automatically in the Eclipse and more details are described in the tutorial.
This tutorial deals with the concept of the default constructor. We have seen that the constructor is the first entity which is called when an object is created. Hence if the variables are assigned while they are created then it has the same working as the default constructor when we assign random values to the specific variables.
This works fine unless the user assigns a constructor after which the user has to assign values for each of the variables.
This tutorial shows the working of constructors and the types of constructors such as the parameterized or non-parameterised. The non-parameterised constructors are defined by the user, the user assigns the values manually to the variables. But if the user makes use of parameterized constructor then values are passed on each instance creation.
Inheritance is one the most important OOPS concepts. This concept is important because it deals assigning the blocks of code which are repeatedly used to a class(base class), and then using the unique properties (methods or variables) which are only used in the respective classes(derived class).
The derived classes such as the Bike, Car, and Truck automatically inherit the variables such as the engine, wheels, seats etc. from the base class when it inherits from the base class.
The above-explained concept is explained here with the same example. Here the class which extends the base class (Vehicle class), can access it's entities (if they are declared as public and not private). Hence more of such topics can be seen in further coming videos.
This part deals with the attributes which are not declared as public. Hence in order to access the attributes of the base class the setters of the derived class need to be used in order assign values to the variables of the base class which can be done by using the super() method.
This part is a continuation of the above topic. As specified earlier the super method is used to assign specific values to the base class. In this way, we can assign values to the base class attributes using the super methods and then use it in the derived class by getters or simply displaying the values.
This tutorial deals with using the toString method instead of printing each attribute by calling the respective getter. Hence this method is also set by setting to String method from the Source tab in the menu bar. Hence we can print all the attributes by calling the toString method.
This tutorial deals with adding the functionality to the code. Providing certain values for the attributes and setting the conditions like the working of car or etc.
Also, the concept of overriding certain methods or attributes can be seen. If the same method is also implemented in the base class and derived class, the method in the derived class will be executed.
Inheritance as we have seen models an IS-A relation. For example the Bike IS-A vehicle. The Car IS-A Vehicle.
The composition follows a HAS-A relation. For example, Laptop HAS-A Screen, Laptop HAS-A Ram. This concept will be seen further.
In this tutorial, we study composition example. In Inheritance, we dealt with the attributes of other classes. Composition studies HAS-A relation in which we 'inherit' or use the objects of other classes. For example, Laptop HAS-A Processor which may have many features. Hence we inherit the object and then access the attributes through these objects.
This tutorial is the further continuation of the above composition topic. In this topic as discussed the classes inherit the objects of other classes. Hence to access the attributes we need to create the getters to return the object of the classes by the virtue of which we can access the required attribute.
This tutorial deals with describing various functionalities of Composition.
As described earlier in composition we can 'inherit' objects which are used to reference the method or the attribute related to the class.
The same concept is described here when the attributes of processor class are accessed by the Demo class via Laptop.
This tutorial deals with the concept of encapsulation.
Encapsulation simply means restricting access to class variables or methods to outside classes or packages.
This is brought into action in order to impose some restrictions on the variables.
This concept will be studied in detail in forthcoming videos.
This tutorial is in continuation of the previous lecture regarding the same topic. Encapsulation is the restriction implied on the class members so as to restrict their access to outer classes. Here such an example is provided where the outer class cannot initialize other class with a non-parametrized constructor.
This tutorial deals with the concept of polymorphism. Polymorphism in simple words means to have multiple forms of a single entity.
In the above example when a note8 object call features methods by different scopes (class scope, one of Phone and one of SamsungNote8) we obtain different outputs. This concept will be studied further.
This is a continuation of the above tutorial. In this tutorial, another such example of the same function depicting a different output when referenced by the object of the different class is shown.
Here the same example as above is taken in an altogether different function outside the main function which has a return type of Phone class.
This tutorial deals with interfaces. The interfaces are somewhat similar to a class but have very interesting properties. Interfaces serve as an outline of the class 'implementing it'(inherit). The members declared in it are public, static by default.
Hence we can have a constructor for an abstract class (which will be discussed further) but not for the interface as it contains static members.
If any method (abstract by default) is not declared in the class implementing it then the class has to declared as abstract.
A method which only declared and not defined is called an abstract method. A class can contain zero or more abstract methods. We cannot create an object of abstract class.
Hence we have to use inheritance to define the method (abstract).
But the class that we created to extend the abstract should define all the abstract methods. The new class which extends the abstract class is called as the Concrete Class.
If the Concrete class doesn’t define the all the methods, then we have to define the class as abstract too.
Why should we use the abstract class?
Consider a class Person. Consider two classes Students and Faculty which inherit from the Person class.
Hence we don’t want to create an object of class person but only Students and Faculty.
Here is the use of the abstract class.
Interfaces, as discussed earlier, is the outline or the prototype for the classes implementing it.
Multiple inheritances are not allowed in Java due to problems such as the diamond problem which causes crashing of applications.
Interfaces are used to perform multiple inheritances which can be seen in this video.
Here in Java Inner classes is the concept where we want to add more encapsulation to the given code. When we declare a class inside a class then the inside class can access all the private members in addition to the inner class can be hidden from the outside world.
Also, it is logical to group two classes which are related together.
The types of nested classes are categorized here.
Category of nested class, we have already seen in the inner class and further types will be seen in the forthcoming videos.
The working of the local inner class which is defined or structured inside the outer class is shown here. Here the example of door and lock is shown as a real-life example.
The advantage of such case is the inner class is completely hidden from the outside world.
The working of the anonymous object is shown here. The anonymous object simply means creating a new Object without assigning it to a reference. Hence this could be used only once in the execution of a program as it is not referenced to any variable.
The class having no name and which is used to overwrite an interface or an abstract method is called an anonymous inner class.
This tutorial depicts the advantages of inner classes as we have discussed so far in this series of tutorials.
This tutorial deals with taking input from the user by using the Scanner class. There were various datatypes as we have seen earlier. The syntax for each of the datatype is discussed here. Hence the user will be able to take input from the user.
The implementation of a static variable is shown here. The basic concept of a static variable is that has only one reference variable. Hence the use of such variables can be done to keep a basic count on the objects created or objects accessing a class.
We have seen the inner classes. The inner classes can access the outer variables. The static inner classes can only access the static members. Hence the non-static members when tried to access give an error.
This lecture is a continuation of the above lecture.
Here the properties of the inner static class are shown and also how they can access the outer class variables and methods is shown. After the lecture user will learn how we can use this type of classes in our daily programs.
In this tutorial, the use of the final keyword in a program is shown. When a final keyword is assigned to a variable then the variable cannot be changed. Hence we the user tries to change the value using setter or constructor then errors creep into the program.
More use of this word will be seen further.
The final keyword is very useful for the following purposes. When we define a method as final then it cannot be modified by any other class overriding the same method.
If a class is defined final then it cannot be used for inheritance and cannot override any method.
It is a way to group many classes belonging to a specific project. A package is like a folder of similar things such as music or a folder of movies. The package adds a different level on inheritance, this level of inheritance is by default applied to all the members created in the method. Hence a package is a useful and efficient entity in java. The package also has a naming convention which we have studied earlier. We can also import the packages which will result in accessing all the classes and methods in it.
This is a continuation of the above topic. The same example which addresses the topic is used. A package is imported and hence used in other class. Also, various ways to import classes is shown here.
The scope of the variable is defined by the passage of the variable in which it can be used and accessed. The scope is an important concept in the OOPS. We have learned that public, private, protected and default which is the package. These are the scope operators which operate on a variable to decide their existence in various parts of the code.
The above concept is explained with the help of a table which includes all levels of access.
The same concept is explained with the help of classes.
The public variable is visible everywhere in contrast to the private variable which is local variable to a class and protected variable which is also not visible in the different classes until It has the same package.
The above concept is explained with the help of a table that includes all levels of access. (in the class) which also includes packages, subclass, and non-subclass.
Exception Handling is the done to avoid errors which occur during the runtime of the program. Hence in such cases we take care of such exceptions to prevent the program from ending abruptly. A number of things can give rise to the following kinds of exceptions such as the file not found error or any type of input type error where the datatype was different than expected or etc. We learn to avoid this and structure our program accordingly in this section.
This is a continuation of the above lecture as it shows multiple catch blocks for a single try block. It also shows the hierarchy of the exception classes. All the exceptions can be further classified into Throwable and Unchecked Exception which can be further classified into many more which will be seen forward.
This further explains is the concept of a hierarchy of the exception classes. This hierarchy if not maintained can transform into the code being unreachable at some points. For example, if the Exception catch block appears before the Arithmetic Exception Block then the latter will become unreachable as the Exception will catch all the thrown exceptions.
The finally block is the block that always gets executed no matter the program throws an exception or not. But we have to follow some basic conditions that the catch blocks always is after the throw block.
This could be used to execute an important segment of code we always want the compiler to execute no matter what is the state of the exception.
Throws are used to suppress the error if the user doesn't want to specify the try and catch block. Note that this doesn’t handle the error only suppresses it. It should be used only when the developer is sure that the error doesn't occur.
The throw is used to forcefully throw an error where it is decided by the developer regarding the certain conditions.
This is manually defined by the users as suggested by the name. For example while developing a simple HTML form we want to throw an exception when the password length is less than 8 than such exceptions are used.
This division of exceptions is done by java on the basis of the level of importance of the exception. The checked exceptions are handled by the java compiler itself and the unchecked exception are handled by the user (not mandatory) in case of occurrence of such exceptions.
This is used to define a set of constants in java. Not only constant by it could also call any method, constructor associated to it. Which will be seen further in the tutorial.
Enums are default public static hence we can directly reference variable by Enum Name.
We have already studied the basics of the string datatype. Here in this tutorial we see the basic methods such as equals to and replace being formed on the strings. These methods along with many more make the usage of string very efficient.
Various built-in methods of the String datatype is shown here. We will learn about the further use of them in the upcoming documents.
The method for string formatting is shown here by the use of printf method.
The printf method in Java is somewhat similar to the one in the c, We can use the printf method in java to define the number of decimals that is required in the output if the float datatype and also the printf command Is same as in c where the statement to be printed which includes the conversion types and datatypes are separated by comma.
At the end of each section, we provide you with the source code of all the programs implemented in the section. The tutorial for extracting and using the files has been discussed earlier in the previous section.
The array is basically a collection, an arrangement of similar datatypes entities. Thus for a simple example, it is used to assign a common variable name for accessing a large number of entities of the same datatype by the difference of the index number.
The array as seen above is a collection of entities that have similar data types, thus this tutorial deals with the initialization of an array. And various other datatypes. Also how to access the array and certain elements located at various indexes is shown here.
This tutorial deals with the for and for each loop which is the advanced version of for loop. The for loop can be used to iterate over the elements of the array. The foreach loop is a shorter version of the same.
This tutorial deals with call by value and call by reference. While passing a value to function outside the main function, the value in the main function remains unchanged as there is no actual change in the value in the desired memory location. By while passing the value by reference, (such as we pass a pointer to the memory location in C) we can pan the array (which by default passes the address) so that the change can be seen in the variable.
At the end of each section, we provide you with the source code of all the programs implemented in the section. The tutorial for extracting and using the files has been discussed earlier in the previous section.
Welcome to this Java for beginners (Core concepts): Easy course on Java
This Java programming course is specifically designed for beginners who aspire to become Java developers and secure their first job in the field. Whether you are starting from scratch or already familiar with basic programming syntax, this course will equip you with the essential skills and knowledge sought by employers in the Java development industry.
We kick off the course by guiding you through the installation and configuration of Java and Eclipse on various operating systems. From there, we dive into a wide range of topics that encompass all the fundamental concepts, tools, functions, and techniques used in Java application development.
What You'll Learn:
Build a Strong Foundation: Gain a solid understanding of variables, data types, and operators, and learn how to use them effectively in Java programming.
Control Flow: Explore control statements and decision-making techniques to direct the flow of your Java programs.
Master Methods: Learn to create and utilize methods to encapsulate reusable code and enhance the modularity of your applications.
Object-Oriented Programming (OOP): Dive into the core principles of OOP, including encapsulation, inheritance, polymorphism, and abstraction, to design efficient and flexible Java code.
Advanced Concepts: Explore interfaces, abstract classes, inner classes, and anonymous inner classes, enabling you to build more sophisticated applications.
Effective Coding Practices: Understand naming conventions, best practices for organizing code into packages, and how to handle user input to create well-structured Java programs.
Exception Handling: Learn how to handle and manage exceptions, ensuring your programs gracefully handle errors and exceptional situations.
File Handling: Acquire the skills to read from and write to files, enabling you to store and retrieve data from external sources.
Enhance Your Skills: Gain knowledge in areas such as typecasting, string manipulation, enumeration, and static elements to expand your Java proficiency.
Real-World Examples: Through 116 lectures and 12 hours of engaging content, practice coding with real-world examples and practical exercises to reinforce your learning.
Why Choose This Course:
Practical Approach: This course focuses on hands-on practice, providing you with ample opportunities to code and reinforce your understanding of Java programming concepts.
Easy-to-Understand Teaching Style: With a unique and straightforward teaching approach, the instructor simplifies complex Java concepts, ensuring easy comprehension and retention.
Suitable for Beginners: Tailored for individuals with little to no programming experience, this course gradually guides you through the fundamentals, building a strong foundation for your Java journey.
Learn at Your Own Pace: Study from the comfort of your home and access the course materials anytime, allowing you to learn at a pace that suits your schedule.
Transferable Skills: Mastering Java sets a solid foundation for learning other object-oriented programming languages, empowering you to adapt to new technologies and opportunities.
As an experienced application developer, I prioritize helping you overcome any challenges you may encounter. Feel free to ask questions or seek clarification on any topic covered in the course; I am always here to assist you.
Why Learn From Me
As an experienced Web developer, I bring my extensive industry knowledge and eight years of teaching experience to ensure an effective and enriching learning experience. Having successfully taught over 140,000 students, my teaching style emphasizes simplicity and step-by-step guidance. I provide clear examples, address common challenges, and I am readily available to assist with any difficulties you may encounter.
Money-Back Guarantee
We are confident in the value of this course. However, if for any reason you are not satisfied within the first 30 days of enrollment, we offer a no-questions-asked 100% money-back guarantee.
Your satisfaction is our top priority.
Don't Miss Out
Join me on this exciting learning adventure and unlock your potential as a Java developer. Take the first step towards mastering Java programming and gain the confidence to create functional and impactful Java programs.
Enroll in this course today and embark on a rewarding journey into the world of Java programming.
Don't wait any longer - Join us on this exciting adventure today!
See you in the course!