how can I take out the printout of the output in Java program??
explain the processes and it's very urgent so tell it fast
Mamrationalr:
plzzz do it fst i hv to submit it tomorrow
Answers
Answered by
13
hi
___________________,_____________________________________________________ here is your answer
________________________________________________________________________the basic structure of a Java Program is as follows
class CLASSNAME { }
the class name must be same as file name , for example
for our program we will call it to tut 1 and we will call the filename tut 1 Java show the structure will be
class tut 1 { } within a class you will find method the structure of these is as follows
method name ( ) { }
you will notice that there are bracket after the method name you can place variable name within these bracket which will receive the values pass to the method I will talk about this at a later stage.
the most common method that you will used is the 'main' method in the class. however not every class must have a main method the structure of the main method is as follows
public static void main ( String arcs {})
{
}
note the capital as forest ring this is important or you will receive an error . I believe that there are many different ways about putting net text I will use one method which uses the standard Java package.
System . out .print .in ('Welcome To My First Java Program ");
again in this example of the capital yes for system.
the code basically print some line of text which is contained within the courts the line is terminated like most line in Java with a semicolon.
if we put all this quote together it will look like this
class tut 1 {
public static void main (string args {})
{
System . out . print in (" Welcome to my first Java program");
}
}
this program with output the following on the screen
welcome to my first java program
this is the most basic program you can make that provide any functionality.
next we will extend this program data from the user via the keyboard.
to read input from the keyboard we will use the standard Java classes we need to use IOException class which is in the JAVA IO package.
to use this class we must import the Java IO package into this class this is done by the following
___________________,_____________________________________________________ here is your answer
________________________________________________________________________the basic structure of a Java Program is as follows
class CLASSNAME { }
the class name must be same as file name , for example
for our program we will call it to tut 1 and we will call the filename tut 1 Java show the structure will be
class tut 1 { } within a class you will find method the structure of these is as follows
method name ( ) { }
you will notice that there are bracket after the method name you can place variable name within these bracket which will receive the values pass to the method I will talk about this at a later stage.
the most common method that you will used is the 'main' method in the class. however not every class must have a main method the structure of the main method is as follows
public static void main ( String arcs {})
{
}
note the capital as forest ring this is important or you will receive an error . I believe that there are many different ways about putting net text I will use one method which uses the standard Java package.
System . out .print .in ('Welcome To My First Java Program ");
again in this example of the capital yes for system.
the code basically print some line of text which is contained within the courts the line is terminated like most line in Java with a semicolon.
if we put all this quote together it will look like this
class tut 1 {
public static void main (string args {})
{
System . out . print in (" Welcome to my first Java program");
}
}
this program with output the following on the screen
welcome to my first java program
this is the most basic program you can make that provide any functionality.
next we will extend this program data from the user via the keyboard.
to read input from the keyboard we will use the standard Java classes we need to use IOException class which is in the JAVA IO package.
to use this class we must import the Java IO package into this class this is done by the following
Similar questions