Skip to main content

Posts

Some sample Java programming test questions and answers:

  1. Write a Java program to check if a number is even or odd. solution : import java.util.Scanner; public class Main {     public static void main(String[] args) {         Scanner input = new Scanner(System.in);         System.out.print("Enter a number: ");         int num = input.nextInt();         if (num % 2 == 0) {             System.out.println(num + " is even.");         } else {             System.out.println(num + " is odd.");         }     } } 2. Write a Java program to find the largest among three numbers. solution: import java.util.Scanner; public class Main {   ...

Imagination Power Follows The Success

  "Imagination Power Follows The Success" Imagination is more important than knowledge. For knowledge is limited, whereas imagination embraces the entire world, simulating progress, giving birth to evolution.            -Albert Einstein Imagination is the process of mentally capturing the images or some kind of ideas in the mind. It becomes powerful when we demonstration unconsciously in well-manner. As we know everybody has the power to imagine which create some thing in mind mentally before creating it physically. That is, it is true that, everything is invented through imagination before inventing it. For example: Invention of Car, Internet, Airplane, Rocket, Mobile, Phone, Computer, Etc. So the impactful invention directly based on the clear imagination. Those mentally created images and ideas somehow used for the different purpose. Therefore, every creation is start from the imagination whatever those are for good or bad purposes for differen...

Top Patterns in Java Code: How to Print Star(*)/Number/Character

Star Patterns in Java First, let us begin with some of the basic and the commonly asked pattern program in   Java. Such as: Pyramid Star Program, Left Triangle Star Program, Right Triangle Star Program, etc. Below Example prints the star(*), you can replace star to number or character as your wish to print. 1. Pyramid Program: Code: public class Main { public static void main(String[] args) {         for (int i=0; i<5; i++)         {        for (int j=5;j>i;j--)        {             System.out.print(" ");        }        for (int j=0; j<=i; j++ )         {                 System.out.print("*");                 System.out.print(" ");         }    System.out.println();   ...

What is the difference between SSD Vs HDD ?

SSD vs HDD SSD Image via Wikipedia HDD Image via Wikipedia                                                                SSD                                                                      HDD Access times                                      0.1ms                                                           ...

An overview of Three Phase Commit (3PC) Protocol

Section 1: Introduction: The dispersed data source system is a collection of numerous data sources (regional or international) situated at various places are interacting each other with related interaction network that did business and also numerous technical factors for uniform as well as heterogeneous data source system as well as others. (Rahimi & Haug, 2010) Uniform dispersed data source system utilize a similar type of data sources at once for keeping, recovering, conserving, implementation, and also purchase procedure. Whereas, heterogeneous dispersed data source system makes use of several kinds of data sources at an exact same time for the circulation of data source for the objective of duplication, openness as well as fragmentation concerns. Dispersed data source systems are based upon deal handling (EVAGGELIA, 2012) and also via the deal monitoring system implementation of programs are version as well as making information come, fetched and also saved in a data sourc...

Contact Me

Name

Email *

Message *