0% found this document useful (0 votes)
26 views2 pages

Made As Per Makaut Curriculum Assignment: - 01/ Introduction To JAVA Program and Concept of Data Types

Assignment 1

Uploaded by

TEAM ABEducation
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views2 pages

Made As Per Makaut Curriculum Assignment: - 01/ Introduction To JAVA Program and Concept of Data Types

Assignment 1

Uploaded by

TEAM ABEducation
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

MADE AS PER MAKAUT CURRICULUM

Assignment: - 01/ Introduction to JAVA Program and concept of Data Types

a) A Write a java program to print WBUT and Computer Science & Engineering. Apply \n in your
program

CODE:

public class asg1b{

public static void main (String args[]) {

System.out.println("WBUT" + '\n' +"Computer science enginering");

OUTPUT:

b) Write a java program which will take radius of a Circle as user input and calculate area and
perimeter to display the results.

CODE:

import java.util.*;

class ass1a {

public static void main(String[] args){

//TO DO Auto-generated method stub


Scanner sc= new Scanner(System.in);

System.out.println("enter the radius");

int r= sc.nextInt();

double area= 3.14*r*r;

double per =2*3.14*r;

System.out.println("area is"+area);

System.out.println("perimenter is"+per);

OUTPUT:

C) Using command line argument write a java program to print "Object Oriented Programming
Using java"

CODE:

public class ass1c {

public static void main(String[] args) {


int size= args.length;
int i=0;
while(i<size) {
System.out.print(args[i]+"");
i++;
}
// TODO Auto-generated method stub

You might also like