Posts

AdvanceJava_AnonymousClass_LambdaExpression.java

  /* --> Anonymous class is an inner class without a name, which means that     we can declare and instantiate class at the same time.

Zeek_99_GregorianCalendar.java

/* --> get Railway Time(24 hour clock time) --> get 12hour clock time --> get day and date     Use Gregorian Calendar.    */

Zeek_98_CalendarClass.java

/*  Gregory calendar is calendar we use in our day to day life.  It has 12 months from January to December  30 or 31 days in each month except February.  In February 28 days(not a leap year) or 29 days when its a leap year   */

Zeek_97_NewDateTime.java

  /*  --> Getting Today's Date and Time using Java      --> Methods like  --> getDate(),getDay(),getHours(),getMinutes(),getSeconds(),etc  --> Are depricated in new Java Documentation but in eclipse IDE somehow works  */

Zeek_96_DateAndTime.java

  /*  --> Date in java is stored in form of a long number.    --> This long number[currentTimeMillis()] holds the number of milliseconds passed      since 1 January 1970 till now .   */

Zeek_95_HashSet.java

  /*  Please try using Oracle Documentation for better references.  

Zeek_94_ Hashing in Java

  What is hashing in Java and why it is used?

Zeek_93_ArrayDeque.java

  /* --> An ArrayDeque (also known as an “Array Double Ended Queue”, pronounced as “ArrayDeck”)

Zeek_92_LinkedListDemoMethods.java

  /* Most of the methods of ArrayList and LinkedList are same....

Zeek_92_A_ ArrayList and LinkedList

  Difference between ArrayList  and LinkedList

Zeek_91_ArrayListDemoMethods.java

  /* import java.util.*;  ---------> Means you are accessing everything from utils class.

NOTE IMPORTANT

  In this blog I have learned through  various platforms like

Zeek_88 & 89_Collections Framework and Hierarchy (Starting Advanced Java)

Image
                          STARTING ADVANCED JAVA

Zeek_Ch14_PractiseSet1.java

  /* --> Create an array of index 6.

Zeek_85_FinallyBlock.java

  /* --> Java finally block is a block used to execute important code such as closing the connection, etc.

Zeek_84_ThrowVSThrows.java

  /*  throw and throws is the concept of Exception Handling.  

Zeek_83_InheritingExceptionClass.java

  /*   (CUSTOM OR USER-DEFINED) EXCEPTIONS  

Zeek_82_NestedTryBlock.java

  /* --> In Java, using a try block inside another try block is permitted. --> It is called as nested try block.

Zeek_81_HandlingSpecificExceptions.java

  /* Write a code which deals with specific unchecked exceptions in a unique way. For eg- If Arithmetic Exceptions occurs print an instruction.         If ArrayIndexOutOfBoundsException  occurs print different instruction ,etc */

Zeek_80A_Types of Exceptions in Java

Image
Types of Java Exceptions

Zeek_80_TryCatchBlock.java

  /*   Sometimes during writing codes.There are some parts that can throw runtime errors.   Because of few runtime errors the entire code crashes(Entire Code cannot run).  

Zeek_79_Errors.java

  /*  Explain examples of Syntax,Logical and Runtime errors while coding.   */

Zeek_78_Types of Errors in Java

  Types of Errors in Java

Zeek_Ch13_PractiseSet2.java

  /* --> Write a code which gives us the state of the thread(i.e -if thread is new or runnable)   */

Zeek_Ch13_PractiseSet1.java

/* --> Write a code in which a thread is executed infinitely after 10 seconds of running the code .   */

Zeek_75_ThreadMethods.java

  /*       Thread Methods:

Zeek_74_ThreadPriority.java

  /* --> Each thread have a priority. --> Priorities are represented by a number between 1 and 10. ---> In most cases, thread schedular schedules the threads according to their priority      (known as preemptive scheduling).  

Zeek_73_ThreadConstructors.java

/* --> Below are commonly used constructors of Thread class    (Runnable and String defined in Thread class[SEE ORACLE DOCUMENTATION]. Hence use super keyword)  

Zeek_72_Life-Cycle of a Thread

Life-Cycle of a Thread

Zeek_71_RunnableInterfaceThread.java

  /* --> In Zeek_70_JavaThread we inherited(EXTEND) class Thread for seeing concurrency by threads

Zeek_70_JavaThread.java

/* --> Parallelism- Codes Run simultaneously(At a moment all codes running together).   --> Concurrency - Concurrency means multiple tasks which start, run, and complete in  overlapping time periods,in no specific order(At a moment only one code running).

Zeek_69_Multiprocessing And Multithreading in Java

  What is a thread in Java?

Zeek_65_AccessModifiers and what they can access

Modifier Class Package Subclass World

Zeek_64_JavaPackages(Understanding Encapsulation)

Image
  WHAT IS JAVA PACKAGE?

Zeek_62_63_Compiler_VS_Interpreter_and_Java platform independent or not

Image
WHAT DOES COMPILER OR INTERPRETER DO ?

Zeek_Ch11_PractiseSet2.java

  /*  Create a  TV that has features like channelNo(),dishConnection()  Create a LCD_TV that has features of TV plus dolbySound(),hdDisplay(),sleekDesign()  

Zeek_Ch11_PractiseSet1.java

  /*  --> Create a Monkey class that jumps() and bite() and   -->  An interface of BasicAnimals that eat() and sleep()

Zeek_59_Polymorphism.java

  /*Refer to Zeek_49_DynamicDispatch_RuntimePolymorphism

Zeek_58_InheritanceInInterafaces.java

  /*  The following conditions are true regarding inheritance hierarchy:

Zeek_57_DefaultMethodsInInterfaces.java

  /* --->  Create a class MySmartPhone which inherit interfaces MyCamera,MyWifi,MyMemory       and inherits the class CellPhone.

Zeek_56_Multiple Inheritance in Java

  What is Multiple Inheritance?

Zeek_54_Interfaces.java

  /*  Interface in English is a point where two systems meet and interact.

Zeek_53_Abstract.java

  /* --> Abstract in English means existing in thought or as an idea without concrete existance.

Zeek_Ch10_PractiseSet2.java

   /* --> Create a class rectangle with its length and width.  --> Create a class cuboid which is sub class of rectangle(Using concepts of inheritance). --> Use constructors to set its length,width and height. --> Calculate totalSurfaceArea and volume of cuboid    */

Zeek_Ch10_PractiseSet1.java

    /* --> Create a class circle where you define its radius. --> Create a class cylinder with circle class as parent class (using concepts of inheritance ). --> Use getter setter to set values of radius and height.  */

Zeek_49_DynamicDispatch_RuntimePolymorphism.java

  /*    Dynamic Method Dispatch or Runtime Polymorphism---

Zeek_48_MethodOverriding.java

/* ----->Method Overriding- In Java If subclass (child class) has the same method as declared  in the parent class

Zeek_47_ThisSuperKeyword.java

  /* -----> this is a reference keyword -->  i.e variable name in method and class parameter same then for convenience use  this keyword for reference

Zeek_46_ConstructorsInInheritance.java

  /*    INHERITANCE HIERARCHY-The constructors are executed in order 1 -> 2 -> 3      [1]Parent --> [2]Child --> [3]Grandchild      i.e-This inheritance occurs When you create object of Grandchild class

Zeek_45_Inheritance.java

  /* ---Inheritance in Java is a mechanism in which one object acquires all the properties   and behaviors of a parent object  

Zeek_Ch09_PractiseSet2.java

  /*  >> Create a cylinder class and use constructor for its radius and height

Zeek_Ch09_PractiseSet1.java

  /*  >> Create a Cylinder class and use getter setter for its radius and height  >> Calculate Surface Area Base and Volume of cylinder using method.    */

Zeek_43_GuessTheNumber.java

   /* --- Create a class Game, which allows a user to play "Guess the Number"      game once.

Zeek_42_ConstructorInJava.java

  /* ---In Java, a constructor is a block of codes similar to the method

Zeek_40_GetterSetters.java

  package  com.company;

Zeek_Ch08_PractiseSet3.java

/*  Create a class cube and write method to calculate its:  ---totalArea  ---Surafce area of one-face  ---Volume  Take the length of side as an input from user  */

Zeek_Ch08_PractiseSet2.java

  //Create a class CellPhone which prints "Ringing","Vibrating","Silent","Aeroplane Mode"

Zeek_Ch08_PractiseSet1.java

  /*   Create a class Employee1 with following method and propertites:

Zeek_38_CustomClass.java

  /*  Creating your own Java class(Custom class)

Zeek 37- OOP Terminology and its basic types and some other terms

  What are the 4 basics of OOP?

Zeek 36- Introduction to OOPs(Object Oriented Programming)

Image
  What is OOPs concept in Java ?

Zeek_Ch07_PractiseSet1.java

  /* Write a method multiplication that gives multiplication table and use it in main method

Zeek_34_JavaRecursions.java

  /* Recursion in java is a process in which a method calls itself continuously till the end.   A method in java that calls itself is called recursive method   for example- return n* factorial(n-1);  */

Zeek_33_VariableArguments.java

  /* The varrags(VariableArguments) allows the method to accept zero or multiple arguments(values) If we don't know how many argument we will have to pass in the method. */

Zeek_32_MethodOverloading.java

/* If a class has multiple methods having same name but different in parameters,  it is known as Method Overloading. -void: Method that returns nothing.Return type-null,(cannot use return statement ) -static: All object in a class shares static method. */

Zeek_31_MethodInJava.java

  /* -We write a method once and use it many times. We do not require to write code again and again. -The method is executed only when we call or invoke it. -And every program must have a method named main, -Main is the method first invoked when the program is run */

Zeek_Ch06_PractiseSet2.java

  //Create an array and write a code to find its maximum element.

Zeek_Ch06_PractiseSet1.java

//Create an array of 5 float numbers and display their sum using for each loop.

Zeek_28_MultiDimensionArray.java

  /* -Create a multi dimension array that stores floor(ground and first) and -There appartment number in respective floors(3 appartments in 1 floor) and -Print it on console */

Zeek_27_ArrayStarting.java

  /* -Create an array and Use for loop to display in forward and reverse order -Create an array and Use for each loop to display in forward order */

Zeek_Ch5_PractiseSet2.java

  // Print Multiplication table of number .Get number from user. 

Zeek_Ch05_PractiseSet1.java

  // Print sum of first n even integers.Take value of n from user

Zeek_24_ContinueInLoop.java

  package  com.company;

Zeek_23_ForLoop.java

  //Print first 10 odd numbers from 0 using for loop

Zeek_22_DoWhileLoop.java

  //Difference in while and do while loop.

Zeek_21_WhileLoop.java

  // Print integer numbers from 100(including) to 200(including)

Zeek_20_GenerateRandomNo.java

  package  com.company;

Zeek_Ch04_PractiseSet2.java

  /*

Zeek_Ch04_PractiseSet1.java

/* -Write a code which satisfies centain conditions:

Zeek_18_SwitchCaseBreak.java

/* -We can use Switch case break for Strings, Integer and characters.

Zeek_17_RelationalLogicalOperators.java

  /* Write code for following conditions:

Zeek_16_If_Else_Elseif.java

/* Write a program which asks for age and then tells you what you can drive at that age by using if_else conditionals

Zeek_Ch03_PractiseSet2.java

  //Take a name from user(i.e-username) and print a letter by putting username where name appears in letter template . //Letter Template is " Respected name,Read  this blog...Thank you name "

Zeek_Ch03_PractiseSet1.java

  //Ask the user to input a string and replace the space in string with an underscore and print

Zeek_14_StringManipulationMethods.java

  /* -Different methods to manipulate strings -Strings are immutable(once defined, the defined one cannot be changed) */

Zeek_13_PrintManipulations.java

  //Different ways to print package  com.company; import  java.util.Scanner; public   class   Zeek_13_PrintManipulations  {      public   static   void   main ( String []  args ) {                   //System.out.println() working   System . out . println ( "hello Zeek" );   System . out . println ( "This line printed in next line after hello Zeek on console because of ln" );                            //System.out.print() working   System . out . print ( "HII ZEEK" );   System . out . println ( " This line printed next to HII ZEEK on console because...

Zeek_Ch02_PractiseSet2.java

  //Calculate uniform acceleration(a)  by taking value v,u, and s from user.

Zeek_Ch02_PractiseSet1.java

// Write a code which tells us that the given number is greater than the number defined by user

Zeek_10_IncrementDecrement.java

  package  com.company;

Zeek_09_Associativity.java

//Like there is BODMAS in mathematics calculation In Java there is precedence and  //Associativity concept for calculation.

Zeek_08_Operators.java

package  com.company;

Zeek_Ch01_PractiseSet2.java

  //Check whether the number you have input is integer or not

Zeek_Ch01_PractiseSet.java

  //Write a java program that asks user name and prints Hello name.

Zeek_06_BoardPercentage.java

  // Calculate Board percentage using user-input for 5 subjects... //Use float or double because percentage can be in decimals

Zeek_05_UserInput.java

  package  com.company;

Zeek_04_Literals.java

  package  com.company;

MainSum.java

  package  com.company;

Main.java

package  com.company;