Home Answers Viewqa Java-Beginners pls answer these question

 
 


Iswaran
pls answer these question
1 Answer(s)      a year and 10 months ago
Posted in : Java Beginners

Write a program that prompts the user to input the length and width of a rectangle. Then calculate and prints the rectangleâ??s area and perimeter.

View Answers

August 23, 2011 at 11:58 AM


import java.io.*;
class rectangle{
    public static void main(String[] args)throws Exception{
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        System.out.print("Enter Length: ");
        int l=Integer.parseInt(br.readLine());
        System.out.print("Enter Width: ");
        int b=Integer.parseInt(br.readLine());
        int area=l*b;
        int perimeter=(2*l)+(2*b);
        System.out.println("Area of Rectangle: "+area);
        System.out.println("Perimeter of Rectangle: "+perimeter);
    }
}









Related Pages:
pls answer these question
pls answer these question  Write a program that prompts the user to input the length and width of a rectangle. Then calculate and prints the rectangleâ??s area and perimeter.   import java.io.*; class rectangle
pls answer the Trangle pattern
pls answer the Trangle pattern    a b c d e b c d e c d e d e e Please answer and give the code for above triangle
pls answer - Security
pls answer  what are the difference of open source dbms and proprietary dbms
pls help me with this question
pls help me with this question  how to write a program in C++ using encapsulation,polymorphism,inheritance and abstraction?(all these concepts should come in a single program
share your answer to this question
share your answer to this question  i need to know what is the TELERIK CONTROL? what is the map suite? what is dunda chart? Also i have to know what are the websites available which give infor regarding this. Let me know how
pls give me answer ae soon as possible - Ajax
pls give me answer ae soon as possible  i m writing code of ajax technology ...but it is not working pls check it n give me response quickly... give me quick response!!! thanks & regards shashank gupta
i cNT GET ANSWER FOR THIS QUESTION
i cNT GET ANSWER FOR THIS QUESTION  The roots of the quadratic equation ax2+bx+c=0, aïâ??¹0 are given by the following formula: x=(-bÃ?±âË?Å¡(b^2-4ac))/2a In this formula. The term b2-4ac is called
java interview question and answer - Java Interview Questions
java interview question and answer   sir, i want one mark java interview question and answers
send answer
send answer  For online exam project,i want single question on single page and on that page there are three buttons previous,submit,next.If i click on next button it show next question from database
Please , can any one answer this Question?
Please , can any one answer this Question?  How to cummunicate one web application to another web application in different places
Clarify my last question's answer - Java Beginners
Clarify my last question's answer  Dear expert, I've tried out... did not specify my question too clearly. Here's my 2 database... question. Do you want to search through id or through the qualification selected
question
question  pls ans me starting point of the jsp
Java experts.Please answer this question - Java Beginners
Java experts.Please answer this question  class A { void get() { System.out.println("A's method"); } } class C extends A{} class D extends A { void set() { System.out.println("D's method"); } } class ins { public
Constructor Chaining Answer
Java NotesConstructor Chaining Answer Answers to the question in Constructor Chaining. Grandparent() constructor Parent(25) constructor Parent() constructor Child() constructor Copyleft 2003 Fred Swartz MIT License, Last
Question Answer
website. If you found the question you can read the answer if it solves your...? Browse Latest Questions Question-Answer Guidelines... Here, you can post your desired question. For posting any question / query
to know my answer
to know my answer  hi, this is pinki, i can't solve my question "how to change rupee to dollar,pound and viceversa using wrapper class in java." will u help me
hi... pls give me the example of java coding fo following question
hi... pls give me the example of java coding fo following question  example java coding that reads in the radius and length of cylinder and computes volume. formula: Area = radius * radius * PI Volume = area * length
i have a problem to do this question...pls help me..
i have a problem to do this question...pls help me..  Write a program that prompts the user to input an integer and the output the number with the digits reversed. For example if the input is 12345, the output should be 54321
hi... pls give me the example of java coding for following question
hi... pls give me the example of java coding for following question   Write a program that computes loan payments. The loan can be a car loan, a student loan, or a home mortgage loan. The program lets the user enter the interest
hi... pls give me the example of java coding fo following question
hi... pls give me the example of java coding fo following question  Write a java program that reads the following information and prints a payroll statement: Employeeâ??s name (e.g: Sam) Number of hours worked in a week (e.g: 10
on-line examination project?(urgent pls)
on-line examination project?(urgent pls)  Hello friends, i am doing an on-line examination project. In A page i will get n(user requirement) questions from data base(question and five radio buttons) if the user had
i need to answer this Question but i can't do it probably
i need to answer this Question but i can't do it probably   use the web to locate the lyrics to the traditional song"The Twelve Days of Christmas" the song contains a list of gifts received for the holiday.the list is cumulative
Plz send me answer quckly
Plz send me answer quckly  Respected Sir, myself is pavan shrivastava.i want ask a question that is ( we can't create object of interface then how would possible to create object
Please answer me - JSP-Servlet
Please answer me  Hello Guys, this is the third time I'm sending this question. But I've not got the right answer from you. The again is: I need java servlet or jsp codes that I can use to insert and retrieve image from MSSQL
Question-Answer Guidelines
Question-Answer Guidelines How to ask questions... and rating the articles/ tutorials. Same like this, question-answer section... Question-Answer Guidelines Disclaimer RoseIndia does
struts interview Question - Struts
struts interview question and answer java  struts interview question and answer java
Flex-Question
Flex-Question  Hi, i have to take a DOB(date of birth) field and from here i have to calculate age. i am tryin but i am not getting the result......... pls help me
need the answer vry urgently..plz help me...[plzzzzzzzz
need the answer vry urgently..plz help me...[plzzzzzzzz  the question is.... 1-create a form accepting user name,password and confirm password. 2.javascript validation, 3.check against the database that all the information given
answer it soon
answer it soon  write a proggram to accept a number and check whether the sum of prime factors of a number is a prime number
java question
details or the long address details. This means your final answer should have
Question on Checked Exception
Question on Checked Exception   why checked exception force to put try and catch block ? Please send me answer
Core Java Interview Question, Interview Question
;     Question: What is clipping? Answer: Clipping... tasks. Question: What class is the top of the AWT event hierarchy? Answer.... Question: What is the range of the char type? Answer: The range of the char
Interview question link - Java Beginners
Interview question link  Hi, I want JAVA+J2EE interview question and answer please suggesion me link
Core Java Interview Question, Interview Question
. Question: Can an object be garbage collected while it is still reachable? Answer... : z ? Answer: It is written x ? y : z. Question: What is the difference between... object. Question: How is rounding performed under integer division? Answer
java.please answer this...
java.please answer this...   Q1).How we can write a complete JAVA program that computes the following summation formulas..? â??_(i=1)^nâ??ã??i^2=ã?? (n^(2 ) ã??(n+1)ã??^2)/4
Core Java Interview Question, Interview Question
and are laid out using the squares of a grid. Question: What an I/O filter? Answer: An I.... Question: If an object is garbage collected, can it become reachable again? Answer... reachable again. Question: What is the Set interface? Answer: The Set
Core Java Interview Question, Interview Question
;     Question: What is a compilation unit? Answer...? Answer: A dead thread cannot be restarted. Question: What happens if an exception.... Question: Can an abstract class be final? Answer: An abstract class may
Core Java Interview Question, Interview Question
Question: Explain modifier final Answer: Final can be applied... and methods Question: Can abstract class be instantiated Answer... Answer: During the class load time Question: When are the non static
Core Java Interview Question, Interview Question
. Which primitive datatypes are signed. Answer: All except char and Boolean Question.... It range is 0 to 2^7-1 Question: What forms an integral literal can be Answer... respectively Question: What is the default value of Boolean Answer: False
Core Java Interview Question Page 3
. Question: What is user-defined exception in java ?  Answer: User-defined... Core Java Interview Question Page 3       Question: When you declare a method as abstract
Core Java Interview Question, Interview Question
;     Question: What is a transient variable? Answer.... Question: How are Observer and Observable used? Answer: Objects that subclass...() methods have been deprecated in JDK 1.2. Question: Is null a keyword? Answer
Ask JDBC question online
of Roseindia, we are pleased to inform you that we have just begun a new question-answer service ‘Ask Question in JDBC’ for all our visitors. Now you...Ask JDBC question online   
Core Java Interview Question, Interview Question
operator? Answer: No, it is not. Question: Name the eight primitive Java.... Question: Is "abc" a primitive value? Answer: The String literal... as public or abstract. Question: Is a class a subclass of itself? Answer: A class
Core Java Interview Question, Interview Question
? Answer: Frame Question: How are commas used in the intialization... value? Answer: No, an object cannot be cast to a primitive value. Question: What... Core Java Interview Question Page 16  
Core Java Interview Question, Interview Question
a container to be laid out and redisplayed? Answer: validate() Question: What... associative? Answer: The = operator is right associative. Question: What.... Question: Can a double value be cast to a byte? Answer: Yes, a double value can
question - Java Beginners
question  hi,i am chaitanya,i would like to know about how to create a folder in java pls send me the mail immediatly  Hi chaitanya, Do... question is somewhat confusing
Core Java Interview Question, Interview Question
? Answer: Garbage collection. Question: What comes to mind when someone mentions a shallow copy in Java? Answer: Object cloning. Question: If you're... consider? Answer: hashCode() Question: You are planning to do an indexed search
Core Java Interview Question, Interview Question
;     Question: What is an Iterator interface? Answer...? Answer: setBounds() Question: How many bits are used to represent Unicode... interface support event processing. Question: Is sizeof a keyword? Answer: The sizeof