0% found this document useful (0 votes)
2 views1 page

Java Student Info Program Example

Uploaded by

mononk203
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Java Student Info Program Example

Uploaded by

mononk203
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Java Code:

import [Link]; class Student { String name; String dep; String


roll; String mot; void input() { Scanner sc = new Scanner([Link]);
[Link]("enter your name: "); name = [Link]();
[Link]("Enter your department: "); dep = [Link]();
[Link]("Enter your Roll number: "); roll = [Link]();
[Link]("Enter a motivational qoute"); mot = [Link](); }
void output() { [Link]("Name : " + name);
[Link]("Department: " + dep + " Roll: " + roll);
[Link]("\"" + mot + "\""); } } public class
assignment_1_oopl_242400072 { public static void main(String[] args) {
Student s = new Student(); [Link](); [Link](); } }

Program Output:
Name : Mahima Khan jhilik Department: CSE Roll: 242400072 "keep learning"

You might also like