Twenty19

Login or Create Your Twenty19 Account


New to Twenty19? No Worries. Register for free!

Java for Beginners

Rs 2499

90%

21 Reviews

Learn the ever growing programming language and build your own project! The course has been prepared by industry experts and teaches you Core Java skills - Learning, Practicing and developing Core Java skills is now extremely easy with this online course.

  • Learn Anytime/Anywhere
  • Clear your doubts
  • Project Based
  • Get Certificate

Buy "Java for Beginners"

Rs 2499 Have a Coupon Code ? Click 'Pay Online' & login to apply coupon code

pay online

or

Pay by DD/Cheque

Call us on 09962033243 in case of any difficulties.

  • Step 1 Buy this course by making an online or an offline payment

  • Step 2 Access the course anytime, anywhere, learn, practice, evaluate, clear your doubts & track your progress

  • Step 3 Complete the course & get Twenty19 Certificate

Buy & Start Learning or Free Demo

14110 views
  1. Chapter 1

  2. Chapter 2

  3. Chapter 3

    • 3.1 - Variables, Data Types, Literals
    • 3.2 - Operators, Variable declaration and naming rules
    • Quiz 3
  4. Chapter 4

    • 4.1 - Concept of Control Flow Statements, If-Else Statement
    • 4.2 - 'If-else' Statement - Biggest of 2 Numbers
    • 4.3 - 'If-Else If' Statement, Switch Statement, While-Loop
    • 4.4 - Demo - 'While Loop' -Sum of numbers
    • 4.5 - Do While Loop
    • 4.6 - Demo -'Do while' -Sum of 2 Numbers
    • 4.7 - For Loop, For-Each Loop
    • Quiz 4
  5. Chapter 5

    • 5.1 - OOPS
    • 5.2 - Facebook data
    • 5.3 - Object, Class, Fields & Parameters
    • 5.4 - Creating an Object, Accessing Fields & Methods, Sending info to Method
    • 5.5 - Project - Create an Object, Calling Method, Accessing Fields,Sending & Returning Data
    • 5.6 - Modifiers
    • 5.7 - Project - Private Modifier
    • 5.8 - Static & Final keywords, Solution for Magical Numbers
    • 5.9 - Project - Static members & Final Variable
    • 5.10 - Project -Main Method & “System.out.println()”
    • Quiz 5
  6. Chapter 6

  7. Chapter 7

    • 7.1 - Removing Duplicate code using Abstract Class
    • 7.2 - Solution for Multiple Inheritance -Interface
    • 7.3 - Project -Implementing Multiple Inheritance using Interface
    • Quiz 7
  8. Chapter 8

    • 8.1 - Arrays, Declaring, Initializing & Iterating an array
    • 8.2 - Project - Usage of array length & For-each Loop
    • 8.3 - Array of Objects, Returning an array from a Method & Copying contents of an array
    • 8.4 - Demo -Sorting, Searching & Comparing arrays
    • Quiz 8
  9. Chapter 9

    • 9.1 - Polymorphism
    • 9.2 - Project - Method Overloading
    • 9.3 - Overridding Mechanism, Polymorphic Reference Variable
    • 9.4 - Project - Removing duplicate code using Polymorphic variable
    • Quiz 9
  10. Chapter 10

    • 10.1 - Constructors, Contructor Overloading
    • 10.2 - Constructor Chaining, Rules
    • Quiz 10
  11. Chapter 11

    • 11.1 - Packages part 1
    • 11.2 - Packages part 2
    • 11.3 - Packages part 3
    • Quiz 11
  12. Chapter 12

    • 12.1 - Exception Handling
    • 12.2 - Exception Handling Demo
    • Quiz 12
  13. Chapter 13

    • 13.1 - File Handling - I/O part 1
    • 13.2 - File Handling - I/O part 2
    • 13.3 - File Handling - I/O part 3
    • Quiz 13
  • About this Course

    In this course you will learn the basic structure and syntax of the language, OOPS principles and how they are applied in Java applications. In addition, this course covers more advanced features of the language such as abstract classes, interfaces, Inheritance, Polymorphism, Packages, Exception Handling, I/O streams and much more.This is an online course with 53 video lessons & 13 tests. You can learn anytime from your home at your own pace.

  • Project/Practicals in this Course

    Build a Facebook related Project application - 'Companion' in the course. In this project application you can download your Facebook data and implement interesting search features in it like Birthday, Hometown, Profession, Current City etc.

  • Clear your Doubts

    You can ask all the questions in 'Clarify your Doubts' forum anytime, course experts will answer all your questions.

  • Get Certificate

    Receive an E-certificate from us once you complete the course. You can Download the Certificate from your Twenty19 account and also showcase it to your friends and family.

Basics of Creating the Java Program

asked by VishwasKamath

public : it is a access specifier that means it will be accessed by publically.

Static : is a keyword which identifies the class related thing. This means the given Method or variable is not instance related but Class related. It can be accessed without creating the instance of a Class.

Void : is used to define the Return Type of the Method.

main() : it is a method or a function name.

String[] args:its a collection of Strings, separated by a space, which can be typed into the program on the terminal. More times than not, the beginner isn't going to use this variable, but it's always there just in case.

answered by Twenty19Expert Team, 17 days ago. [ 4 : 29 PM, 8th - Mar ]

compiling a java program

asked by MohammadNaqvi

in the command line type
javac filename.java
for ex. if your file name is "new" then for compilation you need to type
javac new.java

answered by vamshijaya, 2 months ago. [ 17th - Feb, 2017 ]

is javascript different from java

asked by HariShankar

The two languages are completely unrelated. Java is strongly typed, while JavaScript is weakly typed. JavaScript has first-class functions; Java lacks them. Java is class-based; JavaScript is prototype-based. Java is distributed as compiled bytecode; JavaScript is distributed in its source code.

answered by PSan, 2 months ago. [ 11th - Feb, 2017 ]

adding path

asked by Naga Durga parvathimandava

No Answers yet

java data types

asked by johnbosco

The size of an int is really compiler dependent.
Back in the day, when processors were 16 bit, an int was 2 bytes.
Nowadays, it's most often 4 bytes on a 32 bits system or 8 bytes on 64 bits system.

Still, using sizeof(int) is the best way to get the size of an integer for the specific system the program is executed on.

answered by Twenty19Expert Team, 4 months ago. [ 24th - Nov, 2016 ]

did not understand the demo program

asked by Dhritimankataki

those are keywords in Java programs

Going over that chapter again will help.

answered by Twenty19Expert Team, 4 months ago. [ 24th - Nov, 2016 ]

JavaFX Self Installer With Inno Setup 5 - Allow user to change install directory

asked by ChallaVenkata Harish

The last selected installation folder has the precedence before the DefaultDirName directive value if the UsePreviousAppDir directive is set to yes, which is by default. If you want to force the directory specified by the DefaultDirName to be selected, turn off the UsePreviousAppDir directive.

answered by Twenty19Expert Team, 6 months ago. [ 28th - Sep, 2016 ]

HI

Please go through my code below and let me know whether it is correct or not as you suggested previously .

Code:
--------
ApplicationName.iss file
----------------------------------

;This file will be executed next to the application bundle image
;I.e. current directory will contain folder HouseHold Offline Application with application files
[Setup]
AppId={{fxApplication}}
AppName=HouseHold Offline Application
AppVersion=1.0
AppVerName=HouseHold Offline Application 1.0
AppPublisher=HouseHold Offline Application
AppComments=HouseHold
AppCopyright=Copyright (C) 2016
;AppPublisherURL=http://java.com/
;AppSupportURL=http://java.com/
;AppUpdatesURL=http://java.com/
DefaultDirName={pf}\HouseHold Offline Application
DisableStartupPrompt=Yes
DisableDirPage=No
DisableProgramGroupPage=Yes
DisableReadyPage=Yes
DisableFinishedPage=Yes
DisableWelcomePage=Yes
DefaultGroupName=HouseHold Offline Application
;Optional License
LicenseFile=
;WinXP or above
MinVersion=0,5.1
OutputBaseFilename=HouseHold Offline Application-1.0
Compression=lzma
SolidCompression=yes
PrivilegesRequired=lowest
SetupIconFile=HouseHold Offline Application\HouseHold Offline Application.ico
UninstallDisplayIcon={app}\HouseHold Offline Application.ico
UninstallDisplayName=HouseHold Offline Application
WizardImageStretch=No
WizardSmallImageFile=HouseHold Offline Application-setup-icon.bmp
ArchitecturesInstallIn64BitMode=x64


[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Files]
Source: "HouseHold Offline Application\HouseHold Offline Application.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "HouseHold Offline Application\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs

[Icons]
Name: "{group}\HouseHold Offline Application"; Filename: "{app}\HouseHold Offline Application.exe"; IconFilename: "{app}\HouseHold Offline Application.ico"; Check: returnTrue()
Name: "{commondesktop}\HouseHold Offline Application"; Filename: "{app}\HouseHold Offline Application.exe"; IconFilename: "{app}\HouseHold Offline Application.ico"; Check: returnFalse()


[Run]
Filename: "{app}\HouseHold Offline Application.exe"; Parameters: "-Xappcds:generatecache"; Check: returnFalse()
Filename: "{app}\HouseHold Offline Application.exe"; Description: "{cm:LaunchProgram,HouseHold Offline Application}"; Flags: nowait postinstall skipifsilent; Check: returnTrue()
Filename: "{app}\HouseHold Offline Application.exe"; Parameters: "-install -svcName ""HouseHold Offline Application"" -svcDesc ""HouseHold Offline Application"" -mainExe ""HouseHold Offline Application.exe"" "; Check: returnFalse()

[UninstallRun]
Filename: "{app}\HouseHold Offline Application.exe "; Parameters: "-uninstall -svcName HouseHold Offline Application -stopOnUninstall"; Check: returnFalse()

[Code]
function returnTrue(): Boolean;
begin
Result := True;
end;

function returnFalse(): Boolean;
begin
Result := False;
end;

function InitializeSetup(): Boolean;
begin
// Possible future improvements:
// if version less or same => just launch app
// if upgrade => check if same app is running and wait for it to exit
// Add pack200/unpack200 support?
Result := True;
end;


build.xml
-------------

<?xml version="1.0" encoding="UTF-8"?>
<project name="gplfTransaction_2016_08_26" default="do-deploy" basedir="." xmlns:fx="javafx:com.sun.javafx.tools.ant">
<target name="init-fx-tasks">
<path id="fxant">
<filelist>
<file name="${java.home}\..\lib\ant-javafx.jar"/>
<file name="${java.home}\lib\jfxrt.jar"/>
</filelist>
</path>

<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
uri="javafx:com.sun.javafx.tools.ant"
classpathref="fxant"/>
</target>
<target name="setup-staging-area">
<delete dir="externalLibs" />
<delete dir="project" />
<delete dir="projectRefs" />

<mkdir dir="externalLibs" />

<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="log4j-1.2.14.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="h2-1.3.164.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="ehcache-1.2.3.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="itextpdf-5.1.0.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="hibernate-validator.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="com.ibm.icu-4.4.2.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="hibernate-commons-annotations.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="hibernate-annotations.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="ejb3-persistence.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="poi-3.9.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="slf4j-log4j12-1.5.8.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="antlr-2.7.6.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="slf4j-api-1.5.8.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="jta-1.1.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="dom4j.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="hibernate-entitymanager.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="javassist-3.9.0.GA.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="commons-collections-3.1.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="cglib-2.2.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26\lib">
<filename name="hibernate3.jar"/>
</fileset>
</copy>

<mkdir dir="project" />
<copy todir="project">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26">
<include name="lib/**" />
</fileset>
</copy>
<copy todir="project">
<fileset dir="E:\GPLF Works\gplfTransaction_2016_08_26">
<include name="src/**" />
</fileset>
</copy>

<mkdir dir="projectRefs" />
</target>
<target name='do-compile'>
<delete dir="build" />
<mkdir dir="build/src" />
<mkdir dir="build/libs" />
<mkdir dir="build/classes" />

<!-- Copy project-libs references -->
<copy todir="build/libs">
<fileset dir="externalLibs">
<include name="slf4j-api-1.5.8.jar"/>
<include name="cglib-2.2.jar"/>
<include name="hibernate-commons-annotations.jar"/>
<include name="com.ibm.icu-4.4.2.jar"/>
<include name="h2-1.3.164.jar"/>
<include name="dom4j.jar"/>
<include name="itextpdf-5.1.0.jar"/>
<include name="antlr-2.7.6.jar"/>
<include name="hibernate-validator.jar"/>
<include name="poi-3.9.jar"/>
<include name="commons-collections-3.1.jar"/>
<include name="hibernate-entitymanager.jar"/>
<include name="log4j-1.2.14.jar"/>
<include name="javassist-3.9.0.GA.jar"/>
<include name="ejb3-persistence.jar"/>
<include name="hibernate-annotations.jar"/>
<include name="ehcache-1.2.3.jar"/>
<include name="hibernate3.jar"/>
<include name="jta-1.1.jar"/>
<include name="slf4j-log4j12-1.5.8.jar"/>
</fileset>
</copy>

<!-- Copy project references -->

<!-- Copy project sources itself -->
<copy todir="build/src">
<fileset dir="project/lib">
<include name="**/*"/>
</fileset>
</copy>
<copy todir="build/src">
<fileset dir="project/src">
<include name="**/*"/>
</fileset>
</copy>

<javac includeantruntime="false" source="1.8" target="1.8" srcdir="build/src" destdir="build/classes" encoding="Cp1252">
<classpath>
<fileset dir="build/libs">
<include name="*"/>
</fileset>
</classpath>
</javac>

<!-- Copy over none Java-Files -->
<copy todir="build/classes">
<fileset dir="project/lib">
<exclude name="**/*.java"/>
</fileset>
<fileset dir="project/src">
<exclude name="**/*.java"/>
</fileset>
</copy>


</target>
<target name="do-deploy" depends="setup-staging-area, do-compile, init-fx-tasks">
<delete file="dist"/>
<delete file="deploy" />

<mkdir dir="dist" />
<mkdir dir="dist/libs" />

<copy todir="dist/libs">
<fileset dir="externalLibs">
<include name="*" />
</fileset>
</copy>


<fx:resources id="appRes">
<fx:fileset dir="dist" includes="gplfTransaction_2016_08_26.jar"/>
<fx:fileset dir="dist" includes="libs/*"/>
</fx:resources>

<fx:application id="fxApplication"
name="Gplf Offline Application"
mainClass="initializer.Initializer"
toolkit="fx"
/>

<mkdir dir="build/classes/META-INF" />



<fx:jar destfile="dist/gplfTransaction_2016_08_26.jar">
<fx:application refid="fxApplication"/>
<fileset dir="build/classes">
</fileset>
<fx:resources refid="appRes"/>

<manifest>
<attribute name="Implementation-Vendor" value="Gplf Offline Application"/>
<attribute name="Implementation-Title" value="Gplf Offline Application"/>
<attribute name="Implementation-Version" value="1.0"/>
</manifest>
</fx:jar>


<mkdir dir="deploy" />
<!-- Need to use ${basedir} because somehow the ant task is calculating the directory differently -->
<fx:deploy
verbose="true"
embedJNLP="false"
extension="false"
includeDT="false"
offlineAllowed="true"
outdir="${basedir}/deploy"
outfile="\gplfTransaction_2016_08_26" nativeBundles="exe"
updatemode="background" >

<fx:platform basedir="${java.home}"/>
<fx:info title="gplfTransaction_2016_08_26" vendor="Gplf Offline Application"/>

<fx:application refId="fxApplication"/>
<fx:resources refid="appRes"/>
</fx:deploy>

<fx:csstobin outdir="build/classes">
<fileset dir="build/classes" includes="**/*.css"/>
</fx:csstobin>

</target>
</project>


Thanks
Harish

answered by ChallaVenkata Harish, 6 months ago. [ 28th - Sep, 2016 ]

hello the DefaultDirName directive value is only there but the UsePreviousAppDir directive is not there in Applicationname.iss file ... let me know where is the UsePreviousAppDir directive?

answered by ChallaVenkata Harish, 6 months ago. [ 29th - Sep, 2016 ]

Is new keyword or operator?

asked by VikramRamekar

Creating an Object
As mentioned previously, a class provides the blueprints for objects. So basically, an object is created from a class. In Java, the new keyword is used to create new objects.

There are three steps when creating an object from a class ?

Declaration ? A variable declaration with a variable name with an object type.

Instantiation ? The 'new' keyword is used to create the object.

Initialization ? The 'new' keyword is followed by a call to a constructor. This call initializes the new object.

answered by BensonM, 6 months ago. [ 25th - Sep, 2016 ]

array size

asked by DebaroonSaha

It contains the allocated size, 10. The unassigned indexes will contain the default value which is 0 for int.

If you use arr.length , it will return 10

answered by Twenty19Expert Team, 7 months ago. [ 8th - Sep, 2016 ]

variables

asked by kingshukghosh

A Public variable can be accessed by all classes in the program
whereas a private can not be accessed.

answered by Twenty19Expert Team, 7 months ago. [ 8th - Sep, 2016 ]

Can I download the videos & learn?

You can re-watch the videos as many times you wish but we do not allow downloading on our platform as we keep track of your progress in regards to the course you learn.

What is special about Twenty19 courses?

Twenty19 Courses are fun to learn and they are structured to be easily understood by anyone.The courses are developed with College students in mind.So courses will have a lot of real world examples and Twenty19 courses are easy to take up and earn a certificate.

If I have any doubt while learning, How can I clear my doubts?

You can raise your doubt in Clear your doubts forum anytime, course experts will answer all your questions. You can also reach us at +91 9962033243 (give us a missed call), send an SMS or drop an email to courses@twenty19.com, one of our team member will call you to support.

Is it safe to use my debit/credit card for making the payment?

No doubt, Your transaction is always safe and secure with Twenty19.

Do I get a certificate of completion?

Yes!! you will receive an E-certificate from us once you complete the course. You can include this is in your Resume to get placed better.

How will I receive the certificate?

Twenty19 certificates will be emailed to your Twenty19 registered Email ID .The very next day of your course completion you will be receiving the certificate.You can download and print your certificate.

Have Questions? Get in touch with us

Call
+91 9962033243

Email
courses@twenty19.com

This is a Free Demo for "Java for Beginners" Course

Experience this course with few video lessons rightaway!

Start Learning

Live Courses Feed

Latest Questions in Forum

Suggest Courses

Teach

Are you an expert in your industry & are passionate about teaching? Join us!

create a course


This feature is not available during Free Demo. Purchase the course to access

Purchase "Java for Beginners"


Buy & Start Learning