Wednesday , October 16 2019

Static and Dynamic Arrays

What is difference between Static and Dynamic Arrays: Static simply means fixed and dynamic simply means having changing behavior. So in case of Static Arrays the maximum size of the arrays should be declared at the time of array creation. While the dynamic arrays can adapt the size on the …

Read More »

Enhanced for Statement

Enhanced for statement: Enhanced for statement or enhanced for loop is a short form of a simple for loop (Counter Controlled Loop) used in Java Language. We know that the simple for loop’s syntax is for (var_initialization ; continuation_condition ; increment/decrement) It has three parts initialization, condition and inc/dec operator. …

Read More »

Quiz Java Arrays

Quiz Java Arrays You must know what are Arrays? How to Declare and Create Arrays? You must have enough practice program examples Using Arrays. You must know the mechanism of Passing Arrays to Methods. Create a Class ResultBook Using an Array to Store the Students Grades. What are Multidimensional Arrays? …

Read More »

Java Scanner

Use of Java Scanner API: import java.util.Scanner; public class JavaScanner { public static void main(String[ ] args) { // create a object of java scanner class Scanner sc = new Scanner(System.in); // get the integer input from a user and store it in variable num int num = sc.nextInt( ); …

Read More »

Introduction to classes and objects in Java

Introduction to classes and objects in Java: Class: Class is a template from which we create objects. Class is a cellection of objects. Object: Instance of a class is called object of that class. Objects are the reusable software components. There are different types of objects like date objects, time …

Read More »