SlideShare a Scribd company logo
1 of 47
Rohan K.Gajre.
what is the meaning of true object
oriented
If we want to do anything in java must be
within a class
what is the meaning of
program compilation
Compilation means to convert your actual
programme or source code in to the
machine code or byte code
Machine code machine independent
Run or execute on any operating system
or plat forms is called as platform
independent this is a feature of java
what is public static void
main(String x[])
This is the main function of java same like
as main function in c
Static content can share all members in
application so main is available in whole
application
Static content load in memory very first
when program run. for program execution
main method must be load in memory so
main is static
what is String x[]
This is a command line argument in java
If we pass the any parameter to main
function is called as command line
argument
what is the use of command line argument in
java
To provide the run time input
e.g.
class Firstprog
{
public static void main(String x[])
{
System.out.println(“Hi I am java");
}
}
How to cross check byte code
created or not
After the program compile java create
the one new file automatically is called
as .class file and in this file contain byte
code
Use the command line argument
If you want provide the input at run
time
Use the command line argument
Or
Java provide the some inbuilt classes for
input. Command line argument is infinite
string array means we can pass the n
number of input through the command line
argument but the first input start with
zero index(basic array rule)
type casting
how to perform the type casting or
type conversion in java
for that java provide some inbuilt classes
for conversion is called as wrapper classes
syntax -->
integervariable=Integer.parseInt(value for conversion|);
e.g. a=Integer.parseInt(x[0]);
Integer is a class in java and parseInt() is
the static method of Integer class this
method is used to convert the any value.
floatvriable=Float.parseFloat(value);
or
Float.valueOf(value).floatValue();
public class FirstBatch{
public static void main(String x[])
{ int a,b,c;
a=Integer.parseInt(x[0]);
b=Integer.parseInt(x[1]);
c=a+b;
System.out.println("Addition is "+c);
}
}
DataInputStream
This class is used to accept the input
from keyboard same like as scanf() in c
this class is a member of java.io package
 To add follow some step’s
Add java.io. pacakge in programme
package is a collection of classes same like
as header file in c
header file is a collection of functions in c
import packagename;
e.g. import java.io.*; -->this statement
allow us to use all classes present in
java.io.
import java.io.DataInputStream;-->we can
use only one class in program from java.io
package
import is the keyword in java which is used
to add the package in program
create the object of DataInputStream
class
if we want to use the class and its
member any where for that we need to
object
Synatx
DataInputStream objectname=new DataInputStream(System.in);
Or
DataInputStream objectname;
objectname=new DataInputStream(System.in); 
E.g..
DataInputStream input=new
DataInputStream(System.in);
use its readLine() method for input
readLine() is the method of
DataInputStream class which is used to
accept the input from keyboard
Use of readLine() method
objectofdatainputstream.readLine()
//P1 import java.io.*;
public class DataFirst
{
public static void main(String x[])throws
Exception
{
DataInputStream xyz=new DataInputStream(System.in);
int num,sq;
System.out.println("Enter the number");
num=Integer.parseInt(xyz.readLine());
sq=num*num;
System.out.println("square is "+sq);
}
}
//P2
import java.io.*;
public class Student
{
public static void main(String x[])throws Exception
{
DataInputStream input=new DataInputStream(System.in);
int number;
String name;
float marks;
System.out.println("enter the name of student");
name=input.readLine();
System.out.println("Enter the id of student");
number=Integer.parseInt(input.readLine());
System.out.println("Enter the marks of student");
}
marks=Float.valueOf(input.readLine()).floatValue();
System.out.println("Name of student "+name);
System.out.println("Id of student is "+number);
System.out.println("Marks of student is "+marks);
}
Problem with readLine() method
Need to convert for every input other than
string for that java provide the another
optional class for input to us Scanner .
Scanner is a class same like as
DataInputStram Scanner is a member of
java.util package
 add the util package in programme
import java.util.*;
create the object of Scanner class
Scanner object=new Scanner(System.in);
e.g Scanner input=new Scanner(System.in);
Use its following method for input
nextInt() --> for integer input
nextFloat() ---> for float input
nextDouble() --> for double input
nextByte() --> for byte input
nextLine() ----> for string input
nextShort() -->short integer input
nextLong() ---> for long integer input
import java.util.*;
public class ScannerApp
{
public static void main(String x[])
{
Scanner xyz=new Scanner(System.in);
int id;
float marks;
String name;
System.out.println("Enter the name ");
name=xyz.nextLine();
System.out.println("enter the id ");
id=xyz.nextInt();
System.out.println("enter the marks ");
marks=xyz.nextFloat();
System.out.println("Name is "+name);
System.out.println("Id is "+id);
System.out.println("Marks is "+marks);
}
}
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt
Java ppt

More Related Content

What's hot

What is Multithreading In Python | Python Multithreading Tutorial | Edureka
What is Multithreading In Python | Python Multithreading Tutorial | EdurekaWhat is Multithreading In Python | Python Multithreading Tutorial | Edureka
What is Multithreading In Python | Python Multithreading Tutorial | EdurekaEdureka!
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javaSaba Ameer
 
Java Exception handling
Java Exception handlingJava Exception handling
Java Exception handlingkamal kotecha
 
Javascript variables and datatypes
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypesVarun C M
 
Control Statements in Java
Control Statements in JavaControl Statements in Java
Control Statements in JavaNiloy Saha
 
Class and object in C++
Class and object in C++Class and object in C++
Class and object in C++rprajat007
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in javaTech_MX
 
Structure of java program diff c- cpp and java
Structure of java program  diff c- cpp and javaStructure of java program  diff c- cpp and java
Structure of java program diff c- cpp and javaMadishetty Prathibha
 
for loop in java
for loop in java for loop in java
for loop in java Majid Ali
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsCore Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsMahika Tutorials
 
Data Types & Variables in JAVA
Data Types & Variables in JAVAData Types & Variables in JAVA
Data Types & Variables in JAVAAnkita Totala
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javaAjay Sharma
 

What's hot (20)

Packages in java
Packages in javaPackages in java
Packages in java
 
Packages in java
Packages in javaPackages in java
Packages in java
 
Introduction to c#
Introduction to c#Introduction to c#
Introduction to c#
 
What is Multithreading In Python | Python Multithreading Tutorial | Edureka
What is Multithreading In Python | Python Multithreading Tutorial | EdurekaWhat is Multithreading In Python | Python Multithreading Tutorial | Edureka
What is Multithreading In Python | Python Multithreading Tutorial | Edureka
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
JAVA PROGRAMMING
JAVA PROGRAMMING JAVA PROGRAMMING
JAVA PROGRAMMING
 
Java Exception handling
Java Exception handlingJava Exception handling
Java Exception handling
 
Javascript variables and datatypes
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypes
 
enums
enumsenums
enums
 
Control Statements in Java
Control Statements in JavaControl Statements in Java
Control Statements in Java
 
Class and object in C++
Class and object in C++Class and object in C++
Class and object in C++
 
Java Swing
Java SwingJava Swing
Java Swing
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
 
Structure of java program diff c- cpp and java
Structure of java program  diff c- cpp and javaStructure of java program  diff c- cpp and java
Structure of java program diff c- cpp and java
 
for loop in java
for loop in java for loop in java
for loop in java
 
Features of java
Features of javaFeatures of java
Features of java
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsCore Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika Tutorials
 
Data Types & Variables in JAVA
Data Types & Variables in JAVAData Types & Variables in JAVA
Data Types & Variables in JAVA
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Java Beans
Java BeansJava Beans
Java Beans
 

Similar to Java ppt (20)

Java Programs
Java ProgramsJava Programs
Java Programs
 
Computer programming 2 chapter 1-lesson 2
Computer programming 2  chapter 1-lesson 2Computer programming 2  chapter 1-lesson 2
Computer programming 2 chapter 1-lesson 2
 
Java 5 and 6 New Features
Java 5 and 6 New FeaturesJava 5 and 6 New Features
Java 5 and 6 New Features
 
Java programs
Java programsJava programs
Java programs
 
Understanding java streams
Understanding java streamsUnderstanding java streams
Understanding java streams
 
Object oriented programming la bmanual jntu
Object oriented programming la bmanual jntuObject oriented programming la bmanual jntu
Object oriented programming la bmanual jntu
 
Lec 5 13_aug [compatibility mode]
Lec 5 13_aug [compatibility mode]Lec 5 13_aug [compatibility mode]
Lec 5 13_aug [compatibility mode]
 
New features and enhancement
New features and enhancementNew features and enhancement
New features and enhancement
 
Reading and writting v2
Reading and writting v2Reading and writting v2
Reading and writting v2
 
Java fundamentals
Java fundamentalsJava fundamentals
Java fundamentals
 
Java 8 features
Java 8 featuresJava 8 features
Java 8 features
 
Core java
Core javaCore java
Core java
 
Learning Java 1 – Introduction
Learning Java 1 – IntroductionLearning Java 1 – Introduction
Learning Java 1 – Introduction
 
final year project center in Coimbatore
final year project center in Coimbatorefinal year project center in Coimbatore
final year project center in Coimbatore
 
Java 8 new features
Java 8 new featuresJava 8 new features
Java 8 new features
 
Class notes(week 5) on command line arguments
Class notes(week 5) on command line argumentsClass notes(week 5) on command line arguments
Class notes(week 5) on command line arguments
 
Class notes(week 5) on command line arguments
Class notes(week 5) on command line argumentsClass notes(week 5) on command line arguments
Class notes(week 5) on command line arguments
 
02basics
02basics02basics
02basics
 
Core java Essentials
Core java EssentialsCore java Essentials
Core java Essentials
 
Java 8 presentation
Java 8 presentationJava 8 presentation
Java 8 presentation
 

Recently uploaded

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 

Recently uploaded (20)

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 

Java ppt

  • 2. what is the meaning of true object oriented If we want to do anything in java must be within a class
  • 3. what is the meaning of program compilation Compilation means to convert your actual programme or source code in to the machine code or byte code Machine code machine independent Run or execute on any operating system or plat forms is called as platform independent this is a feature of java
  • 4. what is public static void main(String x[]) This is the main function of java same like as main function in c Static content can share all members in application so main is available in whole application Static content load in memory very first when program run. for program execution main method must be load in memory so main is static
  • 5. what is String x[] This is a command line argument in java If we pass the any parameter to main function is called as command line argument what is the use of command line argument in java To provide the run time input
  • 6. e.g. class Firstprog { public static void main(String x[]) { System.out.println(“Hi I am java"); } }
  • 7. How to cross check byte code created or not After the program compile java create the one new file automatically is called as .class file and in this file contain byte code Use the command line argument
  • 8. If you want provide the input at run time Use the command line argument Or Java provide the some inbuilt classes for input. Command line argument is infinite string array means we can pass the n number of input through the command line argument but the first input start with zero index(basic array rule)
  • 9. type casting how to perform the type casting or type conversion in java for that java provide some inbuilt classes for conversion is called as wrapper classes syntax --> integervariable=Integer.parseInt(value for conversion|); e.g. a=Integer.parseInt(x[0]);
  • 10. Integer is a class in java and parseInt() is the static method of Integer class this method is used to convert the any value. floatvriable=Float.parseFloat(value); or Float.valueOf(value).floatValue();
  • 11. public class FirstBatch{ public static void main(String x[]) { int a,b,c; a=Integer.parseInt(x[0]); b=Integer.parseInt(x[1]); c=a+b; System.out.println("Addition is "+c); } }
  • 12. DataInputStream This class is used to accept the input from keyboard same like as scanf() in c this class is a member of java.io package  To add follow some step’s Add java.io. pacakge in programme package is a collection of classes same like as header file in c header file is a collection of functions in c
  • 13. import packagename; e.g. import java.io.*; -->this statement allow us to use all classes present in java.io. import java.io.DataInputStream;-->we can use only one class in program from java.io package import is the keyword in java which is used to add the package in program
  • 14. create the object of DataInputStream class if we want to use the class and its member any where for that we need to object Synatx DataInputStream objectname=new DataInputStream(System.in);
  • 16. use its readLine() method for input readLine() is the method of DataInputStream class which is used to accept the input from keyboard Use of readLine() method objectofdatainputstream.readLine()
  • 17. //P1 import java.io.*; public class DataFirst { public static void main(String x[])throws Exception { DataInputStream xyz=new DataInputStream(System.in); int num,sq; System.out.println("Enter the number");
  • 19. //P2 import java.io.*; public class Student { public static void main(String x[])throws Exception { DataInputStream input=new DataInputStream(System.in); int number; String name; float marks; System.out.println("enter the name of student"); name=input.readLine(); System.out.println("Enter the id of student"); number=Integer.parseInt(input.readLine()); System.out.println("Enter the marks of student"); }
  • 20. marks=Float.valueOf(input.readLine()).floatValue(); System.out.println("Name of student "+name); System.out.println("Id of student is "+number); System.out.println("Marks of student is "+marks); }
  • 21. Problem with readLine() method Need to convert for every input other than string for that java provide the another optional class for input to us Scanner .
  • 22. Scanner is a class same like as DataInputStram Scanner is a member of java.util package  add the util package in programme import java.util.*; create the object of Scanner class Scanner object=new Scanner(System.in); e.g Scanner input=new Scanner(System.in); Use its following method for input
  • 23. nextInt() --> for integer input nextFloat() ---> for float input nextDouble() --> for double input nextByte() --> for byte input nextLine() ----> for string input nextShort() -->short integer input nextLong() ---> for long integer input
  • 24. import java.util.*; public class ScannerApp { public static void main(String x[]) { Scanner xyz=new Scanner(System.in); int id; float marks; String name; System.out.println("Enter the name "); name=xyz.nextLine(); System.out.println("enter the id "); id=xyz.nextInt(); System.out.println("enter the marks ");
  • 25. marks=xyz.nextFloat(); System.out.println("Name is "+name); System.out.println("Id is "+id); System.out.println("Marks is "+marks); } }