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. very bad example.......can v call overrided functi
View Tutorial          By: abdul nasir khayam at 2011-10-27 20:57:00

2. I'm a begner but i dont know the way to ask quisti
View Tutorial          By: sajid kahn at 2013-05-23 19:15:26

3. how to declare Array ?? in LINUX
i m try th

View Tutorial          By: Chand at 2012-03-18 06:47:09

4. nice its working good example.... very useful...
View Tutorial          By: Mamatha at 2012-02-02 09:23:40

5. I have compiled by keeping all the points in mind
View Tutorial          By: Sweety at 2011-03-09 22:29:18

6. I'm having trouble figuring out how to sign my mid
View Tutorial          By: Patrick Somers at 2011-04-04 14:54:45

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

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

8. // Using the comma.
class Comma {
pu

View Tutorial          By: jatin kapoor at 2011-01-22 03:43:10

9. Sir,
i am implementing the above code in w

View Tutorial          By: Rahul Singh at 2009-09-01 04:23:25

10. thanks...........its really very helpful for me...
View Tutorial          By: ashwini agarmore at 2013-01-17 06:31:21