Java Program To Accept Employee Details And Display It

import java.io.*; class Employee_Details { public static void main(String args[]) throws IOException { int eno,eage; String ename; float esal; BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println(“Enter The Employee Number: “); eno=Integer.parseInt(br.readLine()); System.out.println(“Enter The Employee Name: “); ename=br.readLine(); System.out.println(“Enter The Employee Age: “); eage=Integer.parseInt(br.readLine()); System.out.println(“Enter The Employee Salary: “); esal=Float.parseFloat(br.readLine()); System.out.println(“Employee Number: “+eno); System.out.println(“Employee Name: “+ename); System.out.println(“Employee Age:…

52,368 total views, 24 views today

Read More

Java Program To Find Area And Circumference Of Circle

import java.lang.*; class Circle { public static void main(String args[]) { float r=1.5f,pi=3.14f; System.out.println(“\nCircle:\n”); System.out.println(“Radius Of The Circle : “+r); System.out.println(“Area Of The Circle : “+(pi*r*r)); System.out.println(“Circumference Of The Circle : “+(2*pi*r)); } } 23,990 total views, 2 views today

23,990 total views, 2 views today

Read More

Java Program To Demonstrate Conditional Operator And Find The Maximum Value

import java.lang.*; class Conditional_operator_max { public static void main (String args[]) { int a=10,b=20,max; System.out.println(“Conditional Operator To Find Maximum Value :\n”); System.out.println(“a = “+a); System.out.println(“b = “+b); max=(a>b)?a:b; System.out.println(“Max Value Is : “+max); } } 1,515 total views, no views today

1,515 total views, no views today

Read More

Java Program To Demonstrate BufferedReader

import java.io.*; class Buffered_Reader_Demo { public static void main(String args[]) throws IOException { int a; float b; BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println(“Enter The Value Of a:”); a=Integer.parseInt(br.readLine()); System.out.println(“Enter The Value Of b:”); b=Float.parseFloat(br.readLine()); System.out.println(“a= “+a+” b= “+b); } } 13,126 total views, no views today

13,126 total views, no views today

Read More

Java Program To Demonstrate Bitwise Operators

import java.lang.*; class Bitwise_operators { public static void main(String args[]) { System.out.println(“\nBitwise Operators : “); System.out.println(“~(10) : “+(~10)); System.out.println(“(10&2) : “+(10&2)); System.out.println(“(10|2) : “+(10|2)); System.out.println(“(10^2) : “+(10^2)); System.out.println(“(102) : “+(10>>2)); System.out.println(“(10>>>2) : “+(10>>>2)); } } 2,170 total views, no views today

2,170 total views, no views today

Read More

Java Program To Demonstrate Arthematic Operators

import java.lang.*; class Arthematic_operators { public static void main(String args[]) { int a=10,b=20; System.out.println(“a=”+a); System.out.println(“b=”+b); System.out.println(“(a+b)=”+(a+b)); System.out.println(“(a-b)=”+(a-b)); System.out.println(“(a*b)=”+(a*b)); System.out.println(“(a/b)=”+(a/b)); System.out.println(“(a%b)=”+(a%b)); } } 4,554 total views, no views today

4,554 total views, no views today

Read More