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. thanks i learnt how to use isset in php
View Tutorial          By: free web directory at 2010-09-15 19:42:28

2. Hi
I am newly in java. I have one dought. I

View Tutorial          By: Saman at 2010-08-03 20:34:38

3. hi could u tell me how to download a file using se
View Tutorial          By: akki at 2013-02-19 05:52:03

4. It may be good ,when you stressed on the point why
View Tutorial          By: Kishore Mylavarapu at 2011-05-25 01:28:50

5. sir i want to knw abt all simple java programs pls
View Tutorial          By: sakthi at 2011-08-29 14:06:10

6. By running ListPorts, I am not getting any output
View Tutorial          By: Srinivasa Rao at 2009-04-02 05:17:20

7. feel happy but i want to database tables also
View Tutorial          By: sisira at 2013-06-05 13:26:51

8. good
View Tutorial          By: vkgurumoorthi@gmail.com at 2014-08-28 14:02:28

9. Thanks a ton Ganesh...
View Tutorial          By: Anonymous at 2012-01-25 11:20:40

10. When I tried to run this code, I got time out ***
View Tutorial          By: Gandhi at 2009-06-04 06:20:48