Comment on Tutorial - Student marks calculation program in Java By Paawan Chaudhary



Comment Added by : satya

Comment Added at : 2012-12-09 10:57:28

Comment on Tutorial : Student marks calculation program in Java By Paawan Chaudhary
import java.lang.*;
import java.io.*;
class student
{
String sname;
int stno,m1,m2,m3,total;
void read()
{
try
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.println("enter stno");
int stno=Integer.parseInt(br.readLine());
System.out.println("enter sname");
sname=br.readLine();
System.out.println("enter m1");
int m1=Integer.parseInt(br.readLine());
System.out.println("enter m2");
int m2=Integer.parseInt(br.readLine());
System.out.println("enter m3");
int m3=Integer.parseInt(br.readLine());
}
catch(Exception e)
{
}
}
void display()
{
System.out.println("\n student details");
System.out.println("\n stno :"+stno);
System.out.println("\n sname :"+sname);
System.out.println("\n m1 :"+m1);
System.out.println("\n m2 :"+m2);
System.out.println("\n m3 :"+m3);
System.out.println("\n total :"+calctot());
}
int calctot()
{
return(m1+m2+m3);
}
public static void main(String args[])
{
student s=new student();
s.read();
s.display();
}
}


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. i really hate do while loop statement, can u pls h
View Tutorial          By: mARjO at 2011-09-01 03:50:18

2. exellent, thks!!!
View Tutorial          By: Eduardo at 2010-01-29 19:20:15

3. This is by far the easiest way I have yet seem, ma
View Tutorial          By: doahh at 2010-03-08 11:23:48

4. good but you don't express the programs examples
View Tutorial          By: anchal at 2010-09-29 02:40:02

5. i have same error sir..
Error applying tran

View Tutorial          By: CRUDZ at 2013-10-13 05:22:24

6. why the code had error in status???
View Tutorial          By: matuz at 2011-11-13 11:35:34

7. Comment: Just for future readers: (apart from the
View Tutorial          By: Anonymous at 2013-05-17 08:53:20

8. thanks for providing such services...
View Tutorial          By: vara at 2008-11-18 02:07:17

9. nice explanation
View Tutorial          By: harish at 2012-12-04 06:20:45

10. but how is the string concatenation done with the
View Tutorial          By: Vipin at 2009-05-09 03:08:51