Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Java while coding
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Maru
Java while coding
1 Answer(s)      5 years and 8 months ago
Posted in : Java Beginners



Advertisement
View Answers

March 23, 2009 at 1:15 AM


Hi friend,

Code to help in solving the problem :

import java.io.*;
class Computation
{
public static void main(String[] args) throws IOException
{
boolean boolexit=true;
do
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter the bodyWeight ");
int bodyWeight = Integer.parseInt(br.readLine());
int calories = bodyWeight*19;
System.out.println("Calories : " + calories);
System.out.println("Are you want to Exit? Y/N");
String exit= br.readLine();
if(exit.equals("Y") || exit.equals("y"))
{
boolexit=false;
}

}
while (boolexit);



}
}


Thanks


Related Tutorials/Questions & Answers:
Java while coding - Java Beginners
Java while coding  Java loop and function coding question? How can I write an application that accepts a person's weight and displays the number...; } } while (boolexit); } } Thanks
Java Coding
Java Coding  Hello, Can u please tel me how to improve my coding techniques.I am feeling difficulty with coding but I am perfect with my theory part
Advertisements
HOW TO I CHANGE THE SWITCH TO IF ELSE OR DO WHILE OR WHILE DO FOR THIS CODING
HOW TO I CHANGE THE SWITCH TO IF ELSE OR DO WHILE OR WHILE DO..."); System.out.println("| q. Quit"); question = console.next().charAt(0... 'l': CheckEmptyList(); case 'q': Quit(); case 'Q
HOW TO I CHANGE THE SWITCH TO IF ELSE OR DO WHILE OR WHILE DO FOR THIS CODING
HOW TO I CHANGE THE SWITCH TO IF ELSE OR DO WHILE OR WHILE DO..."); System.out.println("| q. Quit"); question = console.next().charAt(0... 'l': CheckEmptyList(); case 'q': Quit(); case 'Q
HOW TO I CHANGE THE SWITCH TO IF ELSE OR DO WHILE OR WHILE DO FOR THIS CODING
HOW TO I CHANGE THE SWITCH TO IF ELSE OR DO WHILE OR WHILE DO..."); System.out.println("| q. Quit"); question = console.next().charAt(0... 'l': CheckEmptyList(); case 'q': Quit(); case 'Q
HOW TO I CHANGE THE SWITCH TO IF ELSE OR DO WHILE OR WHILE DO FOR THIS CODING
HOW TO I CHANGE THE SWITCH TO IF ELSE OR DO WHILE OR WHILE DO..."); System.out.println("| q. Quit"); question = console.next().charAt(0... 'l': CheckEmptyList(); case 'q': Quit(); case 'Q
coding in java
coding in java  write a code to calculate the product of odd integers from 1-15   class ProductOfOddIntegers { public static void main(String[] args) { long product=1; for(int i=1;i<=15;i
java coding
java coding  plz correct this one ....i want to retrive data row from databse ...all its working but for combobox it not.......plz plz plz help me...+"'"); while(rs.next()){ jTextField1.setText(rs.getString("name
java coding
java coding  can any one plez tell me how to retrive a row from... where name=?"); while(rs.next()) { String address1...+"'"); while(rs.next()){ text1.setText(rs.getString("name
java coding
java coding  Hi sir, WRITE A PROGRAMME TO MAKE EMPLOYMENT MANAGMENT HAVING COLORS AND FRAME IN IT,???? CAN U SUGGEST ME HOW TO MAKE IT IN CORE JAVA
java coding
java coding  sir i need code for how to send meg from one system to another system
java coding
java coding  i am using netbean to my project and it is Desktop Application.i want my textfield to accept only numbers or only alphabets .........plez plez plez do help me..........i am just beginner to java codes
java coding
java coding  i need to to a project in java and the title is file parsing. i need to read a file or if a particular file is given i have to count the no of vowels, pick out some terms, and to display the details about that file
java coding
java coding  Hai,I am having order table in mysql database.when user click download button the order table data shows in csv format.Its very urgent.please help me. Thanks in advance
java coding
java coding  using swing i want to give an exit button which on clicking ask a msg "JOptionPane" is select "yes" then it should exit or else not....plez help me...... JOptionPane.showConfirmDialog(null,"DO YOU REALLY WANT
JAVA coding
JAVA coding  using classes and arrays implement the following create classes, inheritance, object and execute methods. there are 5 students in a class, capture the surname, first name, age and sex. capture their marks of a given
java coding
java coding  (person, student,employee, faculty and staff are classes) design a class named person and its two subclasses named student and employee    class Person { public String name; public String address; public
Java coding - WebSevices
Java coding for web services  How to start Java Coding for web services
Java Coding Standards
Java Coding Standards       Coding conventions are the rules that a programmer should govern while develop a program so that their source code can be read and maintain easily. Coding
java coding - Java Beginners
java coding  dear sir, i'm doing a java coding using with netbeans ide, so i'm trying to pass some text from one jframe to another jframe which is both are already opend on screen then how to do it? please send me
Image using Java coding
Image using Java coding  Hai, Display image in pdf file using Java coding through Xsl file.. Please help me.. xsl file generate the pdf file
color coding in java
color coding in java  hii..can anyone please help with auto coloring code in java swings..??a particular text field should have a particular color for a particular event..plzz help
coding - Java Beginners
coding  i need to start coding but i don't know how to start it so plz help me  Hi Friend, Please visit the following link: http://www.roseindia.net/java/ Thanks
java coding help plz ?
java coding help plz ?  Given two integers N and M (N ΓΆβ?°Β¤ M), output all the prime numbers between N and M inclusive, one per line. N and M...; int i = (int) Math.ceil(Math.sqrt(number)); while
coding problem - Java Beginners
coding problem  hi! i declared date as date datatype in oracle now i need to retrieve date from database to my java code.how can i please help me... = conn.createStatement(); rs = stmt.executeQuery(GET_RECORD); while (rs.next
single frame coding in java
single frame coding in java  sir, i am a beginner in java.i want to do a desktop application in java in which a single frame satisfies all needs.but i want changes in that frame only.how can i solve this?i think multiple frames
Java Coding - Java Beginners
Java Coding  How do I code the following: Code a while loop... = 0; int num=0; while(num<100) { count++; num = 5*count... on Java visit to : http://www.roseindia.net/java/ Thanks
coding problem - Java Beginners
coding problem  i had a big doubt. public ArrayList readExpenseType() throws ClassNotFoundException, SQLException,Exception { DBConnection dbc...=stmt1.executeQuery(sqlStmt1); while(rs.next()) { ExpenseTypeBean eBean=new
Coding - Java Beginners
Coding  How to do a coding to view employee name, salary and EPF. The EPF is calculated from the salary like 10% from their salary. and it also show... the technologies you create the application in Java/JSP/Servlet/JSF/Struts
while executing a java program
while executing a java program  while iam executing a simple java program after i type "java simple.java" there was a an error occuring.the error is "exception in thread "main" java.lang.noclassdeffounderror:simple" what thus
JAVA Coding - Java Beginners
JAVA Coding  Have to write a function that will write out from 1...; int word ; string=""; while ( number != 0 ){ switch ( n ){ case 1 : word..., q ; if ( number < 10 ){ show ( st1[number] ) ; } if ( number > 9
Advertisements
 

 

 

DMCA.com