Thursday , January 28 2021

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 »