Wednesday 1 December 2021

Android & i-Phone Application Developers

 Android & i-Phone Application Developers

Excellent Knowledge of API implementation

Understanding of overall app architectures like MVVM.

Experience:

total work: 2 years (Preferred)

Email id : info@lifeinfotech.in

Website : www.lifeinfotech.in

Phone : 7510001977,947354726

Android & i-Phone Application Developers

 Android & i-Phone Application Developers

Experience : 6 months to 4 year

Skills Required For Android/i-OS Developer:

Excellent knowledge of the Android and i-OS SDK.

Excellent Knowledge of XML and JSON a requirement.

Excellent Knowledge of API implementation.

Excellent Knowledge of SqlLite and a working experience in SQL databases.

Excellent Knowledge of HTML and Javascript a plus.

Experience:

total work: 2 years (Preferred)

Email id : info@lifeinfotech.in

Website : www.lifeinfotech.in

Phone : 7510001977,9473547262

Android Developer

 Android Developer

Job Description

Designation: Android Developer

We are looking for an Android developer responsible for the development and maintenance of applications aimed at a vast number of diverse Android devices.

Salary- 15,000 to 25,000

Experience:

total work: 2 years (Preferred)

Email id : info@lifeinfotech.in

Website : www.lifeinfotech.in

Phone : 7510001977,9473547262

Android Developer ₹12,730 - ₹20,000 a month

 Android Developer

₹12,730 - ₹20,000 a month

Strong knowledge of Android SDK, different versions of Android or Flutter and how to deal with different screens.

Familiarity with RESTful APIs to connect Android applications to back-end services

Strong knowledge of Android UI design principles, patterns, and best practices

Experience with offline storage, threading, and performance tuning. Knowledge in (SQlite), TCP Communication, Firebase.

Ability to design applications around natural user interfaces, such as touch

Familiarity with the use of additional sensors, Bluetooth connection.

Knowledge of the open-source Android ecosystem and the libraries available for common tasks

Ability to understand business requirements and translate them into technical requirements

Familiarity with cloud message APIs and push notifications

Lucknow, Uttar Pradesh

Experience:

total work: 2 years (Preferred)

Email id : info@lifeinfotech.in

Website : www.lifeinfotech.in

Phone : 7510001977,9473547262

PHP Developer

 PHP Developer

Salary: ₹12,730 - ₹20,000 a month

Description:

2-4 years of software development experience in hands-on capacity Working experience

Skills: Php Web Developer,Wordpress,MVC Framework,Codeigniter

Email id : info@lifeinfotech.in

Website : www.lifeinfotech.in

Phone : 7510001977,9473547262


PHP Developer Job Description

 PHP Developer

Job Description

We are looking for a PHP Developer with strong knowledge of PHP web frameworks such as Laravel and basic understanding of front-end technologies, such as JavaScript, HTML, and CSS.

Experience: 2-5 Years

Email id : info@lifeinfotech.in

Website : www.lifeinfotech.in

Phone : 7510001977,9473547262

Full Stack Web Developer

 SENIOR PHP, LARAVEL, CODEIGNITER DEVELOPER

(KEY SKILLS: Laravel, React JS, Node JS, Cake PHP, CodeIgniter, Zend, Yii, MVC Architecture, Core PHP, Custom Coding, HTML5, CSS3, jQuery, JavaScript, Magento, Joomla, WordPress, MySQL, NoSQL.)

Experience:

Web development: 2 years (Preferred)

Email id : info@lifeinfotech.in

Website : www.lifeinfotech.in

Phone : 7510001977,9473547262

Senior Web Developer

 Senior Web Developer

SENIOR PHP, LARAVEL, CODEIGNITER DEVELOPER

(KEY SKILLS: Laravel, React JS, Node JS, Cake PHP, CodeIgniter, Zend, Yii, MVC Architecture, Core PHP, Custom Coding, HTML5, CSS3, jQuery, JavaScript, Magento, Joomla, WordPress, MySQL, NoSQL.)

Experience:

Web development: 2 years (Preferred)

Email id : info@lifeinfotech.in

Website : www.lifeinfotech.in

Phone : 7510001977,9473547262

PHP Developer Lucknow, Uttar Pradesh

 PHP Developer

Lucknow, Uttar Pradesh

₹8,000 - 12,000 a month

Experience:

total work: 1 years (Preferred)

Software Development: 2 years (Preferred)

Email id : info@lifeinfotech.in

Website : www.lifeinfotech.in

Phone : 7510001977,9473547262

PHP Developer Lucknow, Uttar Pradesh

 PHP Developer

Lucknow, Uttar Pradesh

₹15,000 - ₹20,000 a month

Experience:

total work: 2 years (Preferred)

Software Development: 2 years (Preferred)

Email id : info@lifeinfotech.in

Website : www.lifeinfotech.in

Phone : 7510001977,9473547262

Sr.PHP Developer Lucknow, Uttar Pradesh

 Sr.PHP Developer

Lucknow, Uttar Pradesh

₹12,730 - ₹20,000 a month

Strong of web application development using PHP

Ability to design, develop and document scalable applications and APIs.

Possess in-depth understanding of database technologies i.e. SQL

Proficient knowledge in development tools Git and agile practice.

Knowledge on code Igniter will add On to your profile

Work experience in real-time applications.

Experience:

total work: 2 years (Preferred)

Software Development: 2 years (Preferred)

Email id : info@lifeinfotech.in

Website : www.lifeinfotech.in

Phone : 7510001977,9473547262

Saturday 11 September 2021

What is a Computer Network?

 What is a Computer Network?

Computer Network is a group of computers connected with each other through wires, optical fibres or optical links so that various devices can interact with each other through a network.

The aim of the computer network is the sharing of resources among various devices.

In the case of computer network technology, there are several types of networks that vary from simple to complex level.

Components Of Computer Network:

Major components of a computer network are:
NIC(National interface card)
NIC is a device that helps the computer to communicate with another device. The network interface card contains the hardware addresses, the data-link layer protocol use this address to identify the system on the network so that it transfers the data to the correct destination.

There are two types of NIC: wireless NIC and wired NIC.

Wireless NIC: All the modern laptops use the wireless NIC. In Wireless NIC, a connection is made using the antenna that employs the radio wave technology.
Wired NIC: Cables use the wired NIC to transfer the data over the medium.
Hub
Hub is a central device that splits the network connection into multiple devices. When computer requests for information from a computer, it sends the request to the Hub. Hub distributes this request to all the interconnected computers.

Switches
Switch is a networking device that groups all the devices over the network to transfer the data to another device. A switch is better than Hub as it does not broadcast the message over the network, i.e., it sends the message to the device for which it belongs to. Therefore, we can say that switch sends the message directly from source to the destination.
Cables and connectors
Cable is a transmission media that transmits the communication signals. There are three types of cables:

Twisted pair cable: It is a high-speed cable that transmits the data over 1Gbps or more.
Coaxial cable: Coaxial cable resembles like a TV installation cable. Coaxial cable is more expensive than twisted pair cable, but it provides the high data transmission speed.
Fibre optic cable: Fibre optic cable is a high-speed cable that transmits the data using light beams. It provides high data transmission speed as compared to other cables. It is more expensive as compared to other cables, so it is installed at the government level.
Router
Router is a device that connects the LAN to the internet. The router is mainly used to connect the distinct networks or connect the internet to multiple computers.

Modem
Modem connects the computer to the internet over the existing telephone line. A modem is not integrated with the computer motherboard. A modem is a separate part on the PC slot found on the motherboard.

Uses Of Computer Network
Resource sharing: Resource sharing is the sharing of resources such as programs, printers, and data among the users on the network without the requirement of the physical location of the resource and user.
Server-Client model: Computer networking is used in the server-client model. A server is a central computer used to store the information and maintained by the system administrator. Clients are the machines used to access the information stored in the server remotely.
Communication medium: Computer network behaves as a communication medium among the users. For example, a company contains more than one computer has an email system which the employees use for daily communication.
E-commerce: Computer network is also important in businesses. We can do the business over the internet. For example, amazon.com is doing their business over the internet, i.e., they are doing their business over the internet.
Features Of Computer network
A list Of Computer network features is given below.

Communication speed
File sharing
Back up and Roll back is easy
Software and Hardware sharing
Security
Scalability
Reliability

Communication speed

Network provides us to communicate over the network in a fast and efficient manner. For example, we can do video conferencing, email messaging, etc. over the internet. Therefore, the computer network is a great way to share our knowledge and ideas.


File sharing

File sharing is one of the major advantage of the computer network. Computer network provides us to share the files with each other.


Back up and Roll back is easy

Since the files are stored in the main server which is centrally located. Therefore, it is easy to take the back up from the main server.

Software and Hardware sharing

We can install the applications on the main server, therefore, the user can access the applications centrally. So, we do not need to install the software on every machine. Similarly, hardware can also be shared.


Security

Network allows the security by ensuring that the user has the right to access the certain files and applications.


Scalability

Scalability means that we can add the new components on the network. Network must be scalable so that we can extend the network by adding new devices. But, it decreases the speed of the connection and data of the transmission speed also decreases, this increases the chances of error occurring. This problem can be overcome by using the routing or switching devices.


Reliability

Computer network can use the alternative source for the data communication in case of any hardware failure.

Computer Network Architecture

Computer Network Architecture is defined as the physical and logical design of the software, hardware, protocols, and media of the transmission of data. Simply we can say that how computers are organized and how tasks are allocated to the computer.

The two types of network architectures are used:

  • Peer-To-Peer network
  • Client/Server network
  • Peer-To-Peer network

    • Peer-To-Peer network is a network in which all the computers are linked together with equal privilege and responsibilities for processing the data.
    • Peer-To-Peer network is useful for small environments, usually up to 10 computers.
    • Peer-To-Peer network has no dedicated server.
    • Special permissions are assigned to each computer for sharing the resources, but this can lead to a problem if the computer with the resource is down.
    Computer Network Architecture

    Advantages Of Peer-To-Peer Network:

    • It is less costly as it does not contain any dedicated server.
    • If one computer stops working but, other computers will not stop working.
    • It is easy to set up and maintain as each computer manages itself.

    Disadvantages Of Peer-To-Peer Network:

    • In the case of Peer-To-Peer network, it does not contain the centralized system . Therefore, it cannot back up the data as the data is different in different locations.
    • It has a security issue as the device is managed itself.

    Client/Server Network

    • Client/Server network is a network model designed for the end users called clients, to access the resources such as songs, video, etc. from a central computer known as Server.
    • The central controller is known as a server while all other computers in the network are called clients.
    • A server performs all the major operations such as security and network management.
    • A server is responsible for managing all the resources such as files, directories, printer, etc.
    • All the clients communicate with each other through a server. For example, if client1 wants to send some data to client 2, then it first sends the request to the server for the permission. The server sends the response to the client 1 to initiate its communication with the client 2.
    Computer Network Architecture

    Advantages Of Client/Server network:

    • A Client/Server network contains the centralized system. Therefore we can back up the data easily.
    • A Client/Server network has a dedicated server that improves the overall performance of the whole system.
    • Security is better in Client/Server network as a single server administers the shared resources.
    • It also increases the speed of the sharing resources.

    Disadvantages Of Client/Server network:

    • Client/Server network is expensive as it requires the server with large memory.
    • A server has a Network Operating System(NOS) to provide the resources to the clients, but the cost of NOS is very high.
    • It requires a dedicated network administrator to manage all the resources.
    • Computer Network Components

    • Computer network components are the major parts which are needed to install the software. Some important network components are NICswitchcablehubrouter, and modem. Depending on the type of network that we need to install, some network components can also be removed. For example, the wireless network does not require a cable.

      Following are the major components required to install a network:

      NIC

      • NIC stands for network interface card.
      • NIC is a hardware component used to connect a computer with another computer onto a network
      • It can support a transfer rate of 10,100 to 1000 Mb/s.
      • The MAC address or physical address is encoded on the network card chip which is assigned by the IEEE to identify a network card uniquely. The MAC address is stored in the PROM (Programmable read-only memory).

      There are two types of NIC:

      Computer Network Components
      1. Wired NIC
      2. Wireless NIC

      Wired NIC: The Wired NIC is present inside the motherboard. Cables and connectors are used with wired NIC to transfer data.

      Wireless NIC: The wireless NIC contains the antenna to obtain the connection over the wireless network. For example, laptop computer contains the wireless NIC.

    • Hub

      A Hub is a hardware device that divides the network connection among multiple devices. When computer requests for some information from a network, it first sends the request to the Hub through cable. Hub will broadcast this request to the entire network. All the devices will check whether the request belongs to them or not. If not, the request will be dropped.

      The process used by the Hub consumes more bandwidth and limits the amount of communication. Nowadays, the use of hub is obsolete, and it is replaced by more advanced computer network components such as Switches, Routers.


      Switch

      A switch is a hardware device that connects multiple devices on a computer network. A Switch contains more advanced features than Hub. The Switch contains the updated table that decides where the data is transmitted or not. Switch delivers the message to the correct destination based on the physical address present in the incoming message. A Switch does not broadcast the message to the entire network like the Hub. It determines the device to whom the message is to be transmitted. Therefore, we can say that switch provides a direct connection between the source and destination. It increases the speed of the network.


      Router

      • A router is a hardware device which is used to connect a LAN with an internet connection. It is used to receive, analyze and forward the incoming packets to another network.
      • A router works in a Layer 3 (Network layer) of the OSI Reference model.
      • A router forwards the packet based on the information available in the routing table.
      • It determines the best path from the available paths for the transmission of the packet.

      Advantages Of Router:

      • Security: The information which is transmitted to the network will traverse the entire cable, but the only specified device which has been addressed can read the data.
      • Reliability: If the server has stopped functioning, the network goes down, but no other networks are affected that are served by the router.
      • Performance: Router enhances the overall performance of the network. Suppose there are 24 workstations in a network generates a same amount of traffic. This increases the traffic load on the network. Router splits the single network into two networks of 12 workstations each, reduces the traffic load by half.
      • Network range

      Modem

      • A modem is a hardware device that allows the computer to connect to the internet over the existing telephone line.
      • A modem is not integrated with the motherboard rather than it is installed on the PCI slot found on the motherboard.
      • It stands for Modulator/Demodulator. It converts the digital data into an analog signal over the telephone lines.

      Based on the differences in speed and transmission rate, a modem can be classified in the following categories:

      • Standard PC modem or Dial-up modem
      • Cellular Modem
      • Cable modem

      Cables and Connectors

      Cable is a transmission media used for transmitting a signal.

      There are three types of cables used in transmission:

      • Twisted pair cable
      • Coaxial cable
      • Fibre-optic cable
      • Computer Network Types

        A computer network is a group of computers linked to each other that enables the computer to communicate with another computer and share their resources, data, and applications.

        A computer network can be categorized by their size. A computer network is mainly of four types:

        Computer Network Types
        • LAN(Local Area Network)
        • PAN(Personal Area Network)
        • MAN(Metropolitan Area Network)
        • WAN(Wide Area Network)

        LAN(Local Area Network)

        • Local Area Network is a group of computers connected to each other in a small area such as building, office.
        • LAN is used for connecting two or more personal computers through a communication medium such as twisted pair, coaxial cable, etc.
        • It is less costly as it is built with inexpensive hardware such as hubs, network adapters, and ethernet cables.
        • The data is transferred at an extremely faster rate in Local Area Network.
        • Local Area Network provides higher security.
        Computer Network Types

        PAN(Personal Area Network)

        • Personal Area Network is a network arranged within an individual person, typically within a range of 10 meters.
        • Personal Area Network is used for connecting the computer devices of personal use is known as Personal Area Network.
        • Thomas Zimmerman was the first research scientist to bring the idea of the Personal Area Network.
        • Personal Area Network covers an area of 30 feet.
        • Personal computer devices that are used to develop the personal area network are the laptop, mobile phones, media player and play stations.
        Computer Network Types

        There are two types of Personal Area Network:

        Computer Network Types
        • Wired Personal Area Network
        • Wireless Personal Area Network

        Wireless Personal Area Network: Wireless Personal Area Network is developed by simply using wireless technologies such as WiFi, Bluetooth. It is a low range network.



        Examples Of Personal Area Network:

        • Body Area Network: Body Area Network is a network that moves with a person. For example, a mobile network moves with a person. Suppose a person establishes a network connection and then creates a connection with another device to share the information.
        • Offline Network: An offline network can be created inside the home, so it is also known as a home network. A home network is designed to integrate the devices such as printers, computer, television but they are not connected to the internet.
        • Small Home Office: It is used to connect a variety of devices to the internet and to a corporate network using a VPN

        MAN(Metropolitan Area Network)

        • A metropolitan area network is a network that covers a larger geographic area by interconnecting a different LAN to form a larger network.
        • Government agencies use MAN to connect to the citizens and private industries.
        • In MAN, various LANs are connected to each other through a telephone exchange line.
        • The most widely used protocols in MAN are RS-232, Frame Relay, ATM, ISDN, OC-3, ADSL, etc.
        • It has a higher range than Local Area Network(LAN).
        Computer Network Types

        Uses Of Metropolitan Area Network:

        • MAN is used in communication between the banks in a city.
        • It can be used in an Airline Reservation.
        • It can be used in a college within a city.
        • It can also be used for communication in the military.

        WAN(Wide Area Network)

        • A Wide Area Network is a network that extends over a large geographical area such as states or countries.
        • A Wide Area Network is quite bigger network than the LAN.
        • A Wide Area Network is not limited to a single location, but it spans over a large geographical area through a telephone line, fibre optic cable or satellite links.
        • The internet is one of the biggest WAN in the world.
        • A Wide Area Network is widely used in the field of Business, government, and education.
        Computer Network Types

        Examples Of Wide Area Network:

        • Mobile Broadband: A 4G network is widely used across a region or country.
        • Last mile: A telecom company is used to provide the internet services to the customers in hundreds of cities by connecting their home with fiber.
        • Private network: A bank provides a private network that connects the 44 offices. This network is made by using the telephone leased line provided by the telecom company.

        Advantages Of Wide Area Network:

        Following are the advantages of the Wide Area Network:

        • Geographical area: A Wide Area Network provides a large geographical area. Suppose if the branch of our office is in a different city then we can connect with them through WAN. The internet provides a leased line through which we can connect with another branch.
        • Centralized data: In case of WAN network, data is centralized. Therefore, we do not need to buy the emails, files or back up servers.
        • Get updated files: Software companies work on the live server. Therefore, the programmers get the updated files within seconds.
        • Exchange messages: In a WAN network, messages are transmitted fast. The web application like Facebook, Whatsapp, Skype allows you to communicate with friends.
        • Sharing of software and resources: In WAN network, we can share the software and other resources like a hard drive, RAM.
        • Global business: We can do the business over the internet globally.
        • High bandwidth: If we use the leased lines for our company then this gives the high bandwidth. The high bandwidth increases the data transfer rate which in turn increases the productivity of our company.

        Disadvantages of Wide Area Network:

        The following are the disadvantages of the Wide Area Network:

        • Security issue: A WAN network has more security issues as compared to LAN and MAN network as all the technologies are combined together that creates the security problem.
        • Needs Firewall & antivirus software: The data is transferred on the internet which can be changed or hacked by the hackers, so the firewall needs to be used. Some people can inject the virus in our system so antivirus is needed to protect from such a virus.
        • High Setup cost: An installation cost of the WAN network is high as it involves the purchasing of routers, switches.
        • Troubleshooting problems: It covers a large area so fixing the problem is difficult.

        Internetwork

        • An internetwork is defined as two or more computer network LANs or WAN or computer network segments are connected using devices, and they are configured by a local addressing scheme. This process is known as internetworking.
        • An interconnection between public, private, commercial, industrial, or government computer networks can also be defined as internetworking.
        • An internetworking uses the internet protocol.
        • The reference model used for internetworking is Open System Interconnection(OSI).

        Types Of Internetwork:

        1. Extranet: An extranet is a communication network based on the internet protocol such as Transmission Control protocol and internet protocol. It is used for information sharing. The access to the extranet is restricted to only those users who have login credentials. An extranet is the lowest level of internetworking. It can be categorized as MANWAN or other computer networks. An extranet cannot have a single LAN, atleast it must have one connection to the external network.

        2. Intranet: An intranet is a private network based on the internet protocol such as Transmission Control protocol and internet protocol. An intranet belongs to an organization which is only accessible by the organization's employee or members. The main aim of the intranet is to share the information and resources among the organization employees. An intranet provides the facility to work in groups and for teleconferences.

        Intranet advantages:

        • Communication: It provides a cheap and easy communication. An employee of the organization can communicate with another employee through email, chat.
        • Time-saving: Information on the intranet is shared in real time, so it is time-saving.
        • Collaboration: Collaboration is one of the most important advantage of the intranet. The information is distributed among the employees of the organization and can only be accessed by the authorized user.
        • Platform independency: It is a neutral architecture as the computer can be connected to another device with different architecture.
        • Cost effective: People can see the data and documents by using the browser and distributes the duplicate copies over the intranet. This leads to a reduction in the cost.


Sunday 11 July 2021

java program 10th clas

 Java Program to check Even or Odd number

import java.util.Scanner;


class CheckEvenOdd

{

  public static void main(String args[])

  {

    int num;

    System.out.println("Enter an Integer number:");


    //The input provided by user is stored in num

    Scanner input = new Scanner(System.in);

    num = input.nextInt();


    /* If number is divisible by 2 then it's an even number

     * else odd number*/

    if ( num % 2 == 0 )

        System.out.println("Entered number is even");

     else

        System.out.println("Entered number is odd");

  }

}


Java Program to reverse words in a String

public class Example

{

   public void reverseWordInMyString(String str)

   {

/* The split() method of String class splits

* a string in several strings based on the

* delimiter passed as an argument to it

*/

String[] words = str.split(" ");

String reversedString = "";

for (int i = 0; i < words.length; i++)

        {

           String word = words[i]; 

           String reverseWord = "";

           for (int j = word.length()-1; j >= 0; j--) 

   {

/* The charAt() function returns the character

* at the given position in a string

*/

reverseWord = reverseWord + word.charAt(j);

   }

   reversedString = reversedString + reverseWord + " ";

}

System.out.println(str);

System.out.println(reversedString);

   }

   public static void main(String[] args) 

   {

Example obj = new Example();

obj.reverseWordInMyString("Welcome to BeginnersBook");

obj.reverseWordInMyString("This is an easy Java Program");

   }

}

Output:

      Welcome to BeginnersBook

emocleW ot kooBsrennigeB 

This is an easy Java Program

sihT si na ysae avaJ margorP

Java Program to calculate simple interest

      import java.util.Scanner;

public class JavaExample

{

    public static void main(String args[]) 

    {

        float p, r, t, sinterest;

        Scanner scan = new Scanner(System.in);

        System.out.print("Enter the Principal : ");

        p = scan.nextFloat();

        System.out.print("Enter the Rate of interest : ");

        r = scan.nextFloat();

        System.out.print("Enter the Time period : ");

        t = scan.nextFloat();

        scan.close();

        sinterest = (p * r * t) / 100;

        System.out.print("Simple Interest is: " +sinterest);

    }

}

Output:


Enter the Principal : 2000

Enter the Rate of interest : 6

Enter the Time period : 3

Simple Interest is: 360.0

   Program to check whether input number is prime or not

      import java.util.Scanner;

class PrimeCheck

{

   public static void main(String args[])

   {

int temp;

boolean isPrime=true;

Scanner scan= new Scanner(System.in);

System.out.println("Enter any number:");

//capture the input in an integer

int num=scan.nextInt();

        scan.close();

for(int i=2;i<=num/2;i++)

{

           temp=num%i;

   if(temp==0)

   {

      isPrime=false;

      break;

   }

}

//If isPrime is true then the number is prime else not

if(isPrime)

   System.out.println(num + " is a Prime Number");

else

   System.out.println(num + " is not a Prime Number");

   }

}

                             

    Out Put


                           

Enter any number:

19

19 is a Prime Number

Output 2:


Enter any number:

6

6 is not a Prime Number

      

 ........................................................................................................

                            Java Program to Check if given Number is Perfect Square

import java.util.Scanner;

class JavaExample { 


    static boolean checkPerfectSquare(double x)  

    { 


// finding the square root of given number 

double sq = Math.sqrt(x); 


/* Math.floor() returns closest integer value, for

* example Math.floor of 984.1 is 984, so if the value

* of sq is non integer than the below expression would

* be non-zero.

*/

return ((sq - Math.floor(sq)) == 0); 

    } 

 

    public static void main(String[] args)  

    { 

System.out.print("Enter any number:");

Scanner scanner = new Scanner(System.in);

double num = scanner.nextDouble(); 

scanner.close();


if (checkPerfectSquare(num)) 

System.out.print(num+ " is a perfect square number"); 

else

System.out.print(num+ " is not a perfect square number"); 

    } 

}

Java Program to print Even numbers from 1 to n or 1 to 100

class JavaExample {

   public static void main(String args[]) {

int n = 100;

System.out.print("Odd Numbers from 1 to "+n+" are: ");

for (int i = 1; i <= n; i++) {

   if (i % 2 != 0) {

System.out.print(i + " ");

   }

}

   }

}

                          Output:


Even Numbers from 1 to 100 are: 2 4 6 8 10 12 14 16 18 20 22 24 26 28 

30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 

78 80 82 84 86 88 90 92 94 96 98 100

                          .................................................

                          ..................................................

Java Program to Find average of 3 numbers


import java.util.Scanner;

public class JavaExample {


 public static void main(String[] args)

    {

        Scanner scan = new Scanner(System.in);

        System.out.print("Enter the first number: ");

        double num1 = scan.nextDouble();

        System.out.print("Enter the second number: ");

        double num2 = scan.nextDouble();

        System.out.print("Enter the third number: ");

        double num3 = scan.nextDouble();

        scan.close();

        System.out.print("The average of entered numbers is:" + avr(num1, num2, num3) );

    }


  public static double avr(double a, double b, double c)

    {

        return (a + b + c) / 3;

    }

}

..............................................................................................

..............................................................................................

Java Program to Calculate Area of Rectangle

import java.util.Scanner;

class AreaOfRectangle {

   public static void main (String[] args)

   {

   Scanner scanner = new Scanner(System.in);

   System.out.println("Enter the length of Rectangle:");

   double length = scanner.nextDouble();

   System.out.println("Enter the width of Rectangle:");

   double width = scanner.nextDouble();

   //Area = length*width;

   double area = length*width;

   System.out.println("Area of Rectangle is:"+area);

   }

}

Output:


Enter the length of Rectangle:

2

Enter the width of Rectangle:

8

Area of Rectangle is:16.0

...............................................................................................................

..................................................................................................................

Java program to calculate area of Square

import java.util.Scanner;

class SquareAreaDemo {

   public static void main (String[] args)

   {

       System.out.println("Enter Side of Square:");

       //Capture the user's input

       Scanner scanner = new Scanner(System.in);

       //Storing the captured value in a variable

       double side = scanner.nextDouble();

       //Area of Square = side*side

       double area = side*side; 

       System.out.println("Area of Square is: "+area);

   }

}

Output:


Enter Side of Square:

2.5

Area of Square is: 6.25



..............................................................................

..................................................................................

Java program to calculate area of Triangle

import java.util.Scanner;

class AreaTriangleDemo {

   public static void main(String args[]) {   

      Scanner scanner = new Scanner(System.in);


      System.out.println("Enter the width of the Triangle:");

      double base = scanner.nextDouble();


      System.out.println("Enter the height of the Triangle:");

      double height = scanner.nextDouble();


      //Area = (width*height)/2

      double area = (base* height)/2;

      System.out.println("Area of Triangle is: " + area);      

   }

}

Output:


Enter the width of the Triangle:

2

Enter the height of the Triangle:

2

Area of Triangle is: 2.0

......................................................................................

........................................................................................

Java Program to calculate area and circumference of circle

import java.util.Scanner;

class CircleDemo

{

   static Scanner sc = new Scanner(System.in);

   public static void main(String args[])

   {

      System.out.print("Enter the radius: ");

      /*We are storing the entered radius in double

       * because a user can enter radius in decimals

       */

      double radius = sc.nextDouble();

      //Area = PI*radius*radius

      double area = Math.PI * (radius * radius);

      System.out.println("The area of circle is: " + area);

      //Circumference = 2*PI*radius

      double circumference= Math.PI * 2*radius;

      System.out.println( "The circumference of the circle is:"+circumference) ;

   }

}

Output:


Enter the radius: 1

The area of circle is: 3.141592653589793

The circumference of the circle is:6.283185307179586

...........................................................................................

............................................................................................


Java Program to Find Factorial using For and While loop

Example: Finding factorial using for loop

public class JavaExample {


    public static void main(String[] args) {


    //We will find the factorial of this number

        int number = 5;

        long fact = 1;

        for(int i = 1; i <= number; i++)

        {

            fact = fact * i;

        }

        System.out.println("Factorial of "+number+" is: "+fact);

    }

}

Output:


Factorial of 5 is: 120

Example 2: Finding Factorial using while loop

public class JavaExample {


    public static void main(String[] args) {


    //We will find the factorial of this number

        int number = 5;

        long fact = 1;

        int i = 1;

        while(i<=number)

        {

            fact = fact * i;

            i++;

        }

        System.out.println("Factorial of "+number+" is: "+fact);

    }

}

Output:


Factorial of 5 is: 120

...............................................................................

..............................................................................

Java Program to Make a Calculator using Switch Case

Example: Program to make a calculator using switch case in Java

import java.util.Scanner;


public class JavaExample {


    public static void main(String[] args) {


    double num1, num2;

        Scanner scanner = new Scanner(System.in);

        System.out.print("Enter first number:");


        /* We are using data type double so that user

         * can enter integer as well as floating point

         * value

         */

        num1 = scanner.nextDouble();

        System.out.print("Enter second number:");

        num2 = scanner.nextDouble();


        System.out.print("Enter an operator (+, -, *, /): ");

        char operator = scanner.next().charAt(0);


        scanner.close();

        double output;


        switch(operator)

        {

            case '+':

            output = num1 + num2;

                break;


            case '-':

            output = num1 - num2;

                break;


            case '*':

            output = num1 * num2;

                break;


            case '/':

            output = num1 / num2;

                break;


            /* If user enters any other operator or char apart from

             * +, -, * and /, then display an error message to user

             * 

             */

            default:

                System.out.printf("You have entered wrong operator");

                return;

        }


        System.out.println(num1+" "+operator+" "+num2+": "+output);

    }

}

Output:


Enter first number:40

Enter second number:4

Enter an operator (+, -, *, /): /

40.0 / 4.0: 10.0

.................................................................................................

............................................................................................

How to write variable description 10th class java computer

Variable description has to be given with each program in Section B. Let us take an example. Make two columns and give the headings ‘variable name’ and ‘used for’ as I have described below: class DoubleLetter { void count(String s1) { s=s1.toUpperCase(); int l=s.length(); int c=0; for( int p=0; p

This post has a number of programs on various well- known series written in java (Bluej). Quite helpful for ICSE (class 9th and 10th) students.

Pythagorean Triplets: //Program to print the Pythagorean triplets from 1 to 200 //A Pythagorean triplet is one that satisfies the condition //h*h=b*b+ht*ht for a right-angled triangle public class pythgorean { public void finfPythagorean() { int b,ht,hy; for(b=1; b<=200;b++) { for(ht=1;ht<=200;ht++) { for(hy=1;hy<=200;hy++) { if(ht

Featured post

Life Infotech now a leading brand in the field of technology training

  Life Infotech now a leading brand in the field of technology training & its invites students around the nation to be a part of the Tra...