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



Ask a Question

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. good. keep it up !
View Tutorial          By: hashu at 2011-06-21 01:49:59

2. unzip jquery-ui-1.10.3.custom

and c

View Tutorial          By: ajmal at 2013-06-06 10:44:55

3. hi
Thanks great your tutorial. i want to wr

View Tutorial          By: fatima at 2009-08-29 00:15:27

4. Thank you, I need exactly this; cheers :)
View Tutorial          By: Lang at 2011-04-08 09:33:24

5. this site is so good...... How can we create a mp4
View Tutorial          By: vikram raj at 2011-01-05 01:03:07

6. good example
View Tutorial          By: WANT TO KNOW WHY WE USE APPEND at 2011-06-14 00:39:48

7. Looks good, but don't use gets(). gets() is respon
View Tutorial          By: Luke at 2011-11-21 09:03:38

8. Thank you very much. Very useful. You are the best
View Tutorial          By: lin at 2011-01-19 00:09:35

9. Dear All...................,
I have run the

View Tutorial          By: Ashraf Abu Aisheh at 2008-12-01 13:52:42

10. sir, i need java code to display position and velo
View Tutorial          By: Sandhya Yadav at 2015-08-20 07:16:04