
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).
Keywords are words whose meaning is already been explained to the compiler, we can make use of these words in our program according to our need, and we cannot use these keywords as variable and constant.
Keywords are also known as reserved words and in Java programming language there are 50 keywords. Out of these 50 keywords, 2 keywords are Deprecated.
The list of keyword is given in table below:-
abstract
Assert
boolean
Break
byte
case
catch
if
Char
Class
continue
Default
do
Double
else
enum
extends
final
Finally
float
For
implements
import
Instanceof
int
interface
long
native
New
package
private
protected
public
Return
short
static
strictfp
super
Switch
synchronized
This
Throw
throws
Transient
try
void
volatile
while
const
goto
abstract
Abstract keyword is used to implement the abstraction.
boolean
Data type
break
Break the execution of the current code block
byte
Data type
Case
Used to label the possible cases for the switch
catch
Specify a block, which handles the specific exception, if occur in the try block.
char
Data type
class
Used to create a class
continue
Could be used to skip statements of the current execution cycle of the loop
default
Used to create a default case, default case gets executed if no case matches the specified value
Do
The keyword gets used in do-while loop
double
Data type
Else
The else keyword is used in conjunction with if to create an if-else statement.
enum
The keyword is used to define enum types
extends
The keyword is used to implement inheritance between two classes
final
Used to mark an element as final, final elements cannot be further modified during execution
float
Data type
For
Used for creating a for loop
implements
Used for implementation of interface
import
Used for importing package(s)
finally
Used for creating a finally block, code inside finally block always gets executed; regardless of exception occurred or not.
instanceof
Returns true if the runtime type of the object is compatible with the class or interface
Int
Data type
interface
Used for declaring interface
Long
Data type
native
Used in method declarations to specify that the method is implemented in another language.
New
It is used for creating instance of a class or array object
package
Used for declaring package
private
Used for marking method, field or class as private. Private elements can be accessed only by own class or subclasses from the same package
protected
Used for marking method, field or class as protected. Protected elements can be only accessed members of their own class, that class's subclasses or classes from the same package
public
Used for marking method, field or class as public.
return
Returns the control along with value (If required) to the called method
short
Data type
static
Used to declare a field, method, or inner class as a class field. Classes maintain one copy of class fields regardless of how many instances exist of that class. (Credit: Wikipedia)
super
Used to access members of a class inherited by the class in which it present
switch
Used for creating the switch case mechanism
synchronized
Used in the declaration of a method or code block to acquire the mutex lock for an object while the current thread executes the code (Credit: Wikipedia)
This
Used to represent an instance of the class in which it appears. (Credit: Wikipedia)
throw
Makes the declared exception instance to be thrown.
throws
Used in method declarations to specify which exceptions are not handled within the method but rather passed to the next higher level of the program. (Credit: Wikipedia)
transient
Declares that an instance field is not part of the default serialized form of an object. (Credit: Wikipedia)
Try
Use to define exception handling for a block of statement
Void
Used to denote, that the method doesn’t return a value.
volatile
Used in field declarations to specify that the variable is modified asynchronously by concurrently running threads
while
It is used to create a while loop
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 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 which 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 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.
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.
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.
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 which 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 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 which always gets executed no matter the programs 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.
The above concept is explained that enums can be used more than one purpose, by the assignment of numbers to the enums and then access it by calling the ordinal function.
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 have been discussed earlier in the previous section.
This course comprises multiple sub-courses, meticulously designed for aspiring Java web developers. It is tailored to equip learners with the essential skills and knowledge required for building robust web applications. Covering all key topics critical to a Java Web Developer’s journey, this course ensures a deep understanding of both foundational and advanced concepts.
Core Topics Covered in This Course
Core Java – Building a solid foundation in Java programming.
JSP & Servlets, Including JSTL (J2EE) – Mastering server-side technologies for dynamic web development.
JSF: Java Server Faces – Developing rich and interactive web applications with Java Server Faces.
Bonus: Enroll now to receive a FREE 6-month subscription to IntelliJ IDEA Ultimate or another JetBrains IDE of your choice, empowering you with cutting-edge tools for professional-grade development.
Practical Web Application Development
In addition to covering theoretical concepts, this course demonstrates the complete process of creating a fully functional web application using JSP and Servlets. You'll gain hands-on experience by applying the skills learned throughout the course.
We are confident that this course will provide you with unparalleled insights and a substantial boost to your knowledge base, setting you on the path to becoming a proficient Java Web Developer.
Join us and take the first step toward achieving your professional goals!