Wednesday , October 16 2019
Home / Java Programming (page 2)

Java Programming

Java is a popular programming language for desktop applications and especially for internet applications. You can download latest Java here.

java logo

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 »

Sample Questions Part 1

Sample Questions and their answers: 1: What will be the output of the following program? public class Printing { public static void main(String[] args) { for(int i=1;i<=10;i++) { for(int j=1;j<=5;j++) System.out.print("*"); System.out.println(); } //end outer for }// end main }// end class printing Output is:  ***** ***** ***** ***** ***** …

Read More »