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. Thank so much it helped me God bless :)
View Tutorial          By: Judito at 2014-06-14 06:52:18

2. ""this"" is a implicit keyword
View Tutorial          By: Gangireddy at 2012-02-15 08:35:18

3. i have a error while i running this program

View Tutorial          By: parul at 2012-02-08 15:40:09

4. aishwarya.. i also have that error.. have you solv
View Tutorial          By: Geok Lin at 2009-04-06 02:26:49

5. Nice article .... Thank you...
View Tutorial          By: viswa at 2012-06-16 17:21:59

6. Yes, you can use the newer one as follows

View Tutorial          By: John at 2012-08-11 01:40:46

7. Very good explanation but i need to know how the c
View Tutorial          By: surender at 2011-11-17 11:15:22

8. a bit extra information on robust
View Tutorial          By: mahesh at 2010-02-02 12:05:37

9. At my phone number, it showing

5 re

View Tutorial          By: Zafar Iqbal at 2013-04-02 19:48:32

10. Hello to Every one!! :-),HERE I'AM NOT WRITING A C
View Tutorial          By: Pulkit Malviya at 2012-08-26 14:56:18