Skip to content
Programmingoneonone
Programmingoneonone
  • Engineering Subjects
    • Internet of Things (IoT)
    • Digital Communication
    • Human Values
  • Programming Tutorials
    • C Programming
    • Data structures and Algorithms
    • 100+ Java Programs
    • 100+ C Programs
    • 100+ C++ Programs
  • Solutions
    • HackerRank
      • Algorithms Solutions
      • C solutions
      • C++ solutions
      • Java solutions
      • Python solutions
    • Leetcode Solutions
    • HackerEarth Solutions
  • Work with US
Programmingoneonone
Programmingoneonone

Print Student Marksheet Program in Java

YASH PAL, 10 July 201919 February 2026

A simple Java project to make a student mark sheet or print the result of the student: In this post, you will learn how to make a simple, good Java project or make a simple Marksheet using just Java programming.

Introduction to the Marksheet program in Java

This is the simple print Result of [Marksheet] student project using just java programming language. and to fully understand this project you need to have at least some knowledge of Java programming language.

This is a small Marksheet project that is very useful for beginners who love to code in Java programming. One can also use this project in their Java project. in this project, you will learn something new about Java programming.

we use classes, variables, arrays, for loops and if statements to create this project. and I recommended you to first create this project on your own conditions and with your own mind of codes with the help of points given below.

if you stuck on any point of the code then you should seek into our course. you can also download this project from the download button given below at the post and also feel free to customize the code and recreate this project on your own conditions and use your own creative mind and also share this project’s link with me at the comment section give the bottom of the page.

Share your own project using my email id: yashpalsinghdeora9829421554@gmail.com

so, I can do create a post on your project and share it with the coders all over the world. 

The logic of the Project

  1. Scan the full name of the student.
  2. Scan the father’s name of the student.
  3. Scan the roll number of the student not an integer in the string in which you can enter the combination of characters and integer values. ex: 17CT3434
  4. Scan the midterm marks of all the six subjects and remember then the marks should not be greater than 15.
  5. Scan the marks of the final exam of all the six subjects and remember that the marks should not be greater than 60.
  6. and then print out the result of the student as same as shown in the image.
  7. Also, print the name of the college as shown in the image.
  8. Also, print the Grand total of all marks of all subjects. 
  9. Also, print the result pass and fail as shown in the image.
Student marksheet program
Student Marksheet Program
Student marksheet program in java
Marksheet
Result of the student program in java

The logic of passing a student

If the total of marks1 and marks2 is greater than 40 for all the subjects, then the student is the pass as shown in the above image.

The logic to fail a student

  1. if the total of marks1 and marks2 is less then 40 for anyone of the subjects then the result of the student fails as shown in the image.
  2. also, print the * symbol at the total of the marks as shown in the image.
Result fail of the student marksheet program in java

Code of Project

import java.util.Scanner;

class Result
{

  public static void main(String arg[])
  {

    String name, fname,rollno;
    int i, Gtotal=0,count=0;
    String subject[] = { "Mathematics", "Human Value", "Physics","Computer Programming","Electrical & Electronics","Mechanical Engineering"};
    String subcode[]= { "MA-102","HU-103","PY-101","CS-103","EE-101","ME-101"};
    int midmarks[]= new int[6];
    int semmarks[]= new int[6];

    Scanner s = new Scanner(System.in);

    System.out.println("t Enter your Full Name: ");
    name = s.nextLine();

    System.out.println("t Enter your Father Name:");
    fname = s.nextLine();

    System.out.println("t Enter your Roll Number:");
    rollno = s.nextLine();

    for(i=0;i<6;i++)
    {
        System.out.println("t Enter Midterm Marks for: "+subject[i]+":");
        midmarks[i] = s.nextInt();
    }
  
    System.out.println("ntttOK NOW");

    for(i=0;i<6;i++)
    {
        System.out.println("t Enter Final Exam Marks for: "+subject[i]+":");
        semmarks[i] = s.nextInt();
    }

    System.out.println("\t\t\t\t\tYOUR RESULT\n");
    System.out.println("\t\t College:t"+"College of Engineering and technology, Bikaner");
    System.out.print("\n\t\t Name:" +name);
    System.out.println("\t\tFather Name: \t" +fname);
    System.out.println("\t\t Roll Number: \t" +rollno);
    System.out.println("\n\t\t "+"Subcode"+"\tmarks1"+"\tmarks2"+"\tTotal");

    for(i=0;i<6;i++)
    {
        if(((midmarks[i])+(semmarks[i])) >=40)
        { 
            System.out.println("tt "+subcode[i]+"tt "+midmarks[i]+"t"+semmarks[i]+"t"+((midmarks[i])+(semmarks[i])));
        }
        else
        {
            System.out.println("tt "+subcode[i]+"tt "+midmarks[i]+"t"+semmarks[i]+"t"+((midmarks[i])+(semmarks[i]))+"*");
            count++;
        }
        
        Gtotal = (Gtotal + ((midmarks[i])+(semmarks[i])));
    }

    if(count >0)
    {
        System.out.println("ntt Grand Total:t"+Gtotal+"tResult: tFAIL");
    }
    else
    {
        System.out.println("ntt Grand Total:t"+Gtotal+"tResult:tPASS");
    }
  }
}
Computer Science Tutorials Java Tutorials Programming Projects Programming Tutorials computer sciencejavaJava programPrograms

Post navigation

Previous post
Next post

Leave a Reply

Your email address will not be published. Required fields are marked *

Simple Java Program Example
Java Program to compare two numbers using if-else
Java Program for the Addition of Two Numbers
Java Program for Subtraction of Two Numbers
Java program to print fibonacci series
Java Program to check a prime number
Java Program to print N prime numbers
Java Program to check a palindrome number
Java Program to Print Student Marksheet
Java Program using Static variable and method
Java Program using an interface
Java Program to print the sum of command line arguments
Java Program for Handling an Exception
Java Swing program to calculate the square of a number
Java Program to use the equal function
Java Program to handle an action event
Java Program using a constructor
Java Program to print shapes using an applet
Java Program to generate random numbers between 1 and 100
Java Program for Method Overloading
Java Program using switch case
Java Program using an abstract class
Java Program to find the sum and product of the digits of a number
Java Program to find the sum of integers divisible by 7
Java Program to concatenate a string using a for loop
Java Program to display a multiplication table
Java Program to swap two values
Java Program to convert days into months
Java Program to find an Armstrong number
Java Program to print characters of integers
Java program to generate the Harmonic series
Java Program to find the average of consecutive N odd and even numbers
Java Program to take command-line arguments
Java program to use a class and an object
Java program using conditional operators
Java program to use this keyword
Java program using a double variable
Java program to use the super keyword
Java program to use a nested switch case
Java Program to check for a leap year
Java Program to print factorial
Java Program to print a list of even numbers
15+ Pattern programs in Java
Java Program to print FLOYD'S TRIANGLE
Java Program to print a star pattern in a square shape
Java Program to print a pyramid of numbers using a for loop
Java Program to print Even number between a range
Java Program to print the Fibonacci series using an array
Java Program to print a star pattern in a pyramid shape
Java Program to check if a list of numbers is a palindrome
Java program to print a star pattern in a reverse pyramid shape
Java program to print prime numbers between given range
Java Program to print a star pattern in a diamond shape
Java Program to print factorial using recursion
Java Program to calculate the area of a circle using radius
Java program to print a star pattern in a triangle shape
Java Program to print a star pattern in a reverse triangle shape
Java Program to print a number pattern in a triangle shape
Java Program to print a number pattern in a reverse triangle shape

Programmingoneonone

We at Programmingoneonone, also known as Programming101 is a learning hub of programming and other related stuff. We provide free learning tutorials/articles related to programming and other technical stuff to people who are eager to learn about it.

Pages

  • About US
  • Contact US
  • Privacy Policy

Practice

  • Java
  • C++
  • C

Follow US

  • YouTube
  • LinkedIn
  • Facebook
  • Pinterest
  • Instagram
©2026 Programmingoneonone | WordPress Theme by SuperbThemes