Java Programming Debugging Code - Assignment
College of Technology - Jaffna
Program 01:
public class Average {
public static void main(String[] args) {
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg = 0.0;
sum = num1 + num2 + num3
avg = sum/3;
System.out.println("Average: " + avg );
}
}
Program 02:
public class AddingTwoNumber
{
public Static void main(String[] args)
{
int a,b,c;
a=10;
b=20;
c=a+b;
system.out.PrintLn(c);
}
}
Program 03:
public class SwapElementsExample {
public static void main(string[] args) {
int num1 = 10;
int num2 = 20;
System.out.println("Before Swapping");
System.out.println("Value of num1 is :" + num1);
System.out.println("Value of num2 is :" +num2);
int temp = num1;
num1 = temp;
num2 = num1;
System.out.println("After Swapping");
System.out.printLn("Value of num1 is :" + temp);
System.out.println("Value of num2 is :" +num2);
}
}
Program 04:
public Class Main {
public static void main(String args[]) {
String FirstName = "Ram";
String LastName = "Kumar";
System.out.println(firstName + " " + lastName);
}
}
Program 05:
public class Main {
public static Void main(String[] args) {
Int time = 25;
if (time < 15) {
System.out.println("Hello.")
} Else {
System.out.println("Welcome.");
}
}
}
Debugging Code - Assignment |
94 Comments
This comment has been removed by the author.
ReplyDeleteS.Thayuran pro-01
ReplyDeletepublic class debuy1 {
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
// TODO code application logic herepublic class Average {
double num1 = 10 ;
double num2 = 15;
double num3 = 20;
double avg = 0.0;
double sum ;
sum = num1 + num2 + num3 ;
avg = sum/3;
System.out.println("Average: " + avg );
}
}
S.Thayuran pro-02
ReplyDeletepublic class debuy2 {
public static void main(String[] args)
{
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println(c);
}
}
02.
ReplyDeletepublic class MyClass {
public static void main(String args[]) {
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println(c);
}
}
S.Thayuran pro-03
ReplyDeletepublic class debuy3 {
public static void main(String[] args) {
int num1 = 10;
int num2 = 20;
System.out.println("Before Swapping");
System.out.println("Value of num1 is :" + num1);
System.out.println("Value of num2 is :" +num2);
int temp = num1;
num1 = temp;
num2 = num1;
System.out.println("After Swapping");
System.out.println("Value of num1 is :" + temp);
System.out.println("Value of num2 is :" +num2);
}
}
System.out.println("Value of num1 is:="+num1); ithila ungaluggu equal podaaddium run aanatha
DeletePro-04
ReplyDeletepublic class Main {
public static void main(String args[]) {
String FirstName = "Ram";
String LastName = "Kumar";
System.out.println(FirstName + " " + LastName);
}
}
03.
ReplyDeletepublic class MyClass {
public static void main(String args[]) {
int num1 = 10;
int num2 = 20;
System.out.println("Before Swapping");
System.out.println("Value of num1 is :" + num1);
System.out.println("Value of num2 is :" +num2);
int temp = num1;
num1 = temp;
num2 = num1;
System.out.println("After Swapping");
System.out.println("Value of num1 is :" +temp);
System.out.println("Value of num2 is :" +num2);
}
}
04.
ReplyDeletepublic class MyClass {
public static void main(String args[]) {
String FirstName = "Ram";
String LastName = "Kumar";
String Fullname= FirstName + LastName;
System.out.println("FirstName " + "LastName = "+Fullname);
}
}
public class Average {
ReplyDeletepublic static void main(String[] args)
{
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg = 0.0;
double sum = num1 + num2 + num3;
avg = sum/3;
System.out.println("Average: " + avg );
05.
ReplyDeletepublic class MyClass {
public static void main(String args[]) {
int time = 25;
if(time < 15)
{
System.out.println("Hello.");
}
else{
System.out.println("Welcome.");
}
}
}
public class Average {
ReplyDeletepublic static void main(String[] args) {
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg = 0.0;
sum = num1 + num2 + num3
avg = sum/3;
System.out.println("Average: " + avg );
}
}
S.thilaxsan
ReplyDeletePrograme 1
package main02;
public class main02 {
public static void main(String[] args) {
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg = 0.0;
double
sum = num1+ num2+ num3;
avg = sum/3;
System.out.println("Average= " + avg );
}
}
Program 02
ReplyDeletepublic class AddingTwoNumber
{
public static void main(String args[])
{
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println("c");
}
}
Pro-05
ReplyDeletepublic class Main2
{
public static void main(String[] args)
{
int time = 25;
if (time < 15){
System.out.println("Hello.");
} else {
System.out.println("Welcome.");
}
}
}
public class AddingTwoNumber
ReplyDelete{
public static void main(String args[])
{
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println("c");
}
}
public class SwapElementsExample {
ReplyDeletepublic static void main(string[] args) {
int num1 = 10;
int num2 = 20;
System.out.println("Before Swapping");
System.out.println("Value of num1 is :" + num1);
System.out.println("Value of num2 is :" +num2);
int temp = num1;
num1 = temp;
num2 = num1;
System.out.println("After Swapping");
System.out.printLn("Value of num1 is :" + temp);
System.out.println("Value of num2 is :" +num2);
}
}
public class Main {
ReplyDeletepublic static void main(String[] args) {
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg = 0.0;
double sum = num1 + num2 + num3;
avg = sum/3;
System.out.println("Average: " + avg );
}
}
public class Main {
ReplyDeletepublic static void main(String[] args) {
int num1 = 10;
int num2 = 20;
System.out.println("Before Swapping");
System.out.println("Value of num1 is :" + num1);
System.out.println("Value of num2 is :" +num2);
int temp = num1;
num1 = temp;
num2 = num1;
System.out.println("After Swapping");
System.out.println("Value of num1 is :" + temp);
System.out.println("Value of num2 is :" +num2);
}
}
public class Main {
ReplyDeletepublic static void main(String[] args) {
String FirstName = "Ram";
String LastName = "Kumar";
System.out.println("firstName + lastName = " +(FirstName + LastName) );
}
}
// JAMES SUBAS DICT PT
ReplyDelete// Programe 01
package Average;
public class Average {
public static void main(String[] args) {
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg = 0.0;
double sum = 0;
sum = num1 + num2 + num3;
avg = sum/3;
System.out.println("Average: " + avg );
}
}
public class Main {
ReplyDeletepublic static void main(String[] args) {
{
int time = 25;
if (time < 15)
{
System.out.println("Hello.");
}
else
{
System.out.println("Welcome.");
}
}
}
}
Dilaksika
ReplyDeletepackage dilaksi;
public class dilaksika {
public static void main(String[] args) {
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println(c);
}
}
package dilaksi;
public class Dilaksika {
public static void main(String[] args) {
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg = 0.0;
double sum;
sum = num1+num2+num3;
avg = sum/3;
System.out.println("Average: " + avg);
}
}
This comment has been removed by the author.
ReplyDeleteProgram 01
ReplyDeletepublic class Average {
public static void main(String[] args) {
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg = 0.0;
double sum = num1 + num2 + num3;
avg = sum/3;
System.out.println("Average: " + avg );
}
}
Program 02
public class AddingTwoNumber
{
public static void main(String[] args)
{
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println(c);
}
}
Program03
public class SwapElementsExample {
public static void main(String[] args) {
int num1 = 10;
int num2 = 20;
System.out.println("Before Swapping");
System.out.println("Value of num1 is :" + num1);
System.out.println("Value of num2 is :" +num2);
int temp = num1;
num1 = temp;
num2 = num1;
System.out.println("After Swapping");
System.out.println("Value of num1 is :" + temp);
System.out.println("Value of num2 is :" +num2);
}
}
Program 04
public class Main {
public static void main(String args[]) {
String firstName = "Ram";
String lastName = "Kumar";
System.out.println(firstName + " " + lastName);
}
}
Program 05
public class Main {
public static void main(String[] args) {
int time = 25;
if (time < 15)
{
System.out.println("Hello.");
}
else
{
System.out.println("Welcome.");
}
}
}
P.Kalaiarasi
Deletepackage thirusirclass;
ReplyDelete/**
*
* @author Vimal
*/
public class AddingTwoNumber {
public Static void main(String[] args);{
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println("The total of a+b = c");
}
}
public class myworld {
ReplyDeletepublic static void main(String args[]) {
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg =0.0;
double sum ;
sum = num1 + num2 + num3
avg = sum/3;
System.out.println("Average: " + avg );
}
}
}
Program 2
ReplyDeletepackage main02;
public class main02 {
public static void main(String[] args) {
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println(c);
}
}
// JAMES SUBAS DICT PT
ReplyDelete// Programe 02
public class AddingTwoNumber
{
public static void main(String[] args)
{
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println(c);
}
}
public class Average {
ReplyDeletepublic static void main(String[] args) {
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg;
double sum= num1 + num2 + num3;
avg = sum/3;
System.out.println("Average: " + avg );
}
}
public class Main
ReplyDelete{
public static void main(String[] args)
{
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println(c);
}
}
public class Average {
ReplyDeletepublic static void main(String[] args) {
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println(c);
}
}
Thakshikan
ReplyDeletepackage myjava;
public class Add {
public static void main (String [] args) {
int a,b,c;
a = 10;
b = 20;
c = a+b;
System.out.println (c);
}
}
S.Thinosan
ReplyDeletePrograme 05
public static void main(String[] args) {
int time = 25;
if (time < 15) {
System.out.println("Hello.");
}
else {
System.out.println("Welcome.");
}
}
}
S.Thinosan
ReplyDeleteProgram - 03
public static void main(String[] args) {
int num1 = 10;
int num2 = 20;
System.out.println("Before Swapping");
System.out.println("Value of num1 is :" + num1);
System.out.println("Value of num2 is :" +num2);
}
}
S.Thinosan
ReplyDeletePrograme - 02
public static void main(String[] args) {
{
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println(c);
}
}
}
S.Thinosan
ReplyDeletePro - 01
public static void main(String[] args) {
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg = 0.0;
double sum = num1 + num2 + num3
avg = sum/3;
System.out.println("Average: " + avg );
}
}
S.Thinosan
ReplyDeletePrograme - 04
public static void main(String[] args) {
String FirstName = "Ram";
String LastName = "Kumar";
System.out.println(FirstName + " " + LastName);
}
}
Jebinson
ReplyDeleteProgram 01
public class Myworld{
public static void main(String args[]){
Average{
double num1 = 10;
double num2 = 15;
double num3 = 20;
double sum;
sum = num1 + num2 + num3;
avg = sum/3;
System.out.println("Average:" +avg);
}
}
K. Jebinson
ReplyDeleteProgram 02
public class Myworld{
public static void main(String[]args){
{
int a, b, c;
a = 10;
B = 20;
C = a+b;
System.out.println(c);
}
}
k.jebinson
ReplyDeleteprogram 03
public class Myworld {
public static void main(String[] args) {
int num1 = 10;
int num2 = 20;
System.out.println("Before Swapping");
System.out.println("Value of num1 is :" + num1);
System.out.println("Value of num2 is :" +num2);
int temp = num1;
num1 = temp;
num2 = num1;
System.out.println("After Swapping");
System.out.println("Value of num1 is :" + temp);
System.out.println("Value of num2 is :" +num2);
}
}
Result
Before Swapping
Value of num1 is :10
Value of num2 is :20
After Swapping
Value of num1 is :10
Value of num2 is :10
k.jebinson
ReplyDeleteProgram 04
public class myname{
public static void main(String args[]) {
String FirstName = "Ram";
String LastName = "Kumar";
System.out.println(FirstName + " " + LastName);
}
}
Result
Ram Kumar
k.jebinson
ReplyDeleteprogram 05
public class myname{
public static void Main(String args[]);
{
int time = 25;
if (time < 15){
System.out.println("Hello.");
} else {
System.out.println("Welcome.");
}
}
}
Mrs.Anoja Purusoththaman
ReplyDeletepackage Activity1;
public class Java {
public static void main(String[] args) {
double num1=10;
double num2=15;
double num3=20;
double avg;
double sum=num1+num2+num3;
avg=sum/3;
System.out.println("Average:" +avg);
}
}
package Activity1;
ReplyDeletepublic class Java2 {
public static void main(String[] args) {
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println(c);
}
}
package Activity1;
ReplyDeletepublic class Java3 {
public static void main(String[] args) {
int num1=10;
int num2=20;
System.out.println("Before Swapping");
System.out.println("Value of num1:"+ (num1));
System.out.println("Value of num2:"+ (num2));
}
}
package Activity1;
ReplyDeletepublic class Java4 {
public static void main(String[] args) {
String FirstName="Ram";
String LastName="Kumar";
System.out.println(FirstName+" "+LastName);
}
}
package Activity1;
ReplyDeletepublic class Java5 {
public static void main(String[] args) {
int time=25;
if(time<15) {
System.out.println("Hello.");
}
else {
System.out.println("Welcome");
}
}
}
This comment has been removed by the author.
ReplyDeleteK.Piratheepa
ReplyDeletepublic class AddingTwoNumber
{
public static void main( String []args)
{
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println (c);
K.Piratheepa
ReplyDeletepublic class Myworld {
public static void main(String[] args) {
int num1 = 10;
int num2 = 20;
System.out.println("Before Swapping");
System.out.println("Value of num1 is :=" + num1);
System.out.println("Value of num2 is :=" +num2);
int temp = num1;
num1 = temp;
num2 = num1;
System.out.println("After Swapping");
System.out.println("Value of num1 is :=" + temp);
System.out.println("Value of num2 is :=" +num2);
}
}
K.Piratheepa
ReplyDeletepublic class Myname{
public static void main(String args[]) {
String FirstName = "Ram";
String LastName = "Kumar";
System.out.println(FirstName + " " + LastName);
}
}
K.Piratheepa
ReplyDeletepublic class Myname{
public static void Main(String args[]);
{
int time = 25;
if (time < 15)
{
System.out.println("Hello");
}
else
{
System.out.println("Welcome");
}
}
}
G.Preyatharsan. P01
ReplyDeletepackage com.tamilbaba;
public class Main {
public static void main(String[] args) {
// write your code here
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg = 0.0;
double sum;
sum = num1 + num2 + num3;
avg = sum / 3;
System.out.println("Average:" + avg);
}
}
G.Preyatharsan. p02
ReplyDeletepackage com.tamilbaba;
public class Main {
public static void main(String[] args) {
// write your code here
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println(c);
}
}
G.Preyatharsan. p03
ReplyDeletepackage com.tamilbaba;
public class Main {
public static void main(String[] args) {
// write your code here
int num1 = 10;
int num2 = 20;
System.out.println("Before Swapping");
System.out.println("Value of num1 is :" + num1);
System.out.println("Value of num2 is :" + num2);
int temp=num1;
num1=temp;
num2=num1;
System.out.println("After Swapping");
System.out.println("Value of num1 is:"+temp);
System.out.println("Value of num2 is :" +num2);
}
}
G.Preyatharsan. p04
ReplyDeletepackage com.tamilbaba;
public class Main {
public static void main(String[] args) {
// write your code here
String FirstName = "Ram";
String LastName = "Kumar";
System.out.println(FirstName + " " + LastName);
}
}
G.Preyatharsan. p05
ReplyDeletepackage com.tamilbaba;
public class Main {
public static void main(String[] args) {
// write your code here
int time = 25;
if (time < 15)
{
System.out.println("Hello.");
}
else
{
System.out.println("Welcome.");
}
}
}
K.Piratheepa
ReplyDeleteSir phone la copy panni paste panna mudiyala sir
Kayaththiry
ReplyDeletepackage MyJava;
public final class MyJava {
public static void main(String[] args) {
Int time = 25;
if (time < 15)
{
System.out.println("Hello.");
}
Else
{
System.out.println("Welcome.");
}
}
public class Average {
Deletepublic static void main(String[] args) {
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg = 0.0;
double sum = num1 + num2 + num3;
avg = sum/3;
System.out.println("Average =" + avg);
}
}
public class AddingTwoNumber{
Deletepublic static void main(String[] args) {
int a,b,c;
a=10;
b=20;
c=a+b;
system.out.println(c);
}
}
import SwapElement.Swap;
Deletepublic class SwapElementsExample {
public static void main(string[] args) {
int num1 = 10;
int num2 = 20;
System.out.println("Before Swapping"); System.out.println("Value of num1 is:" +
num1)
System.out.println("Value of num2 is:"
+num2);
int temp = num1;
num1 = temp;
num2 = num1;
System.out.println("After Swapping");
System.out.println("Value of num1 is:"
temp);
System.out.println("Value of num2 is:"
+num2);
}
}
This comment has been removed by the author.
Deletepublic class Main {
Deletepublic static void main(String args[]) {
String FirstName = "Ram";
String LastName = "Kumar";
String Fullname- FirstName+ LastName; System.out.println("FirstName"+"LastName= "+Fullname)
}
}
K.Piratheepa
ReplyDeletepublic class Average {
public static void main (String [ ]args)
{
double num1=10;
double num2=15;
double num3=20;
double avg=0.0;
double
num1.num2.num3;
avg=sum/3;
System.out.println ("Average:="+avg);
}}
V.Vijayalukshiny
ReplyDeleteProgram 1
public class Average {
public static void main(String[] args) {
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg = 0.0;
double sum = num1 + num2 + num3;
avg = sum/3;
System.out.println("Average: " + avg );
}
}
Vijayalukshiny.V
ReplyDeleteProgram 2
public class AddingTwoNumber {
public static void main(String[] args)
{
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println(c);
}}
This comment has been removed by the author.
ReplyDeleteVijayalukshiny.V
ReplyDeleteProgram 3
public class Myworld {
public static void main(String[] args) {
int num1 = 10;
int num2 = 20;
System.out.println("Before Swapping");
System.out.println("Value of num1 is :" + num1);
System.out.println("Value of num2 is :" +num2);
int temp = num1;
num1 = temp;
num2 = num1;
System.out.println("After Swapping");
System.out.println("Value of num1 is :" + temp);
System.out.println("Value of num2 is :" +num2);
}}
Vijayalukshiny.V
ReplyDeleteProgram 4
public class Myname{
public static void main(String args[]) {
String FirstName = "Ram";
String LastName = "Kumar";
System.out.println(FirstName + " " + LastName);
}
}
Progamme 01
ReplyDeletepublic class MyClass {
public static void main(String args[]) {
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg = 0.0;
double sum = num1 + num2 + num3;
avg = sum/3;
System.out.println("Average: " + avg );
}
}
K.Thenuga
ReplyDeleteProgramme 02
public class MyClass {
public static void main(String args[]) {
int a,b,c;
a=10;
b=20;
c=a+b;
System.out.println(c);
}
}
K.Thenuga
ReplyDeleteProgramme 03
public class MyClass {
public static void main(String args[]) {
int num1 = 10;
int num2 = 20;
System.out.println("Before Swapping");
System.out.println("Value of num1 is :" + num1);
System.out.println("Value of num2 is :" +num2);
int temp = num1;
num1 = temp;
num2 = num1;
System.out.println("After Swapping");
System.out.println("Value of num1 is :" + temp);
System.out.println("Value of num2 is :" +num2);
}
}
K.Thenuga
ReplyDeleteProgramme 04
public class MyClass {
public static void main(String args[]) {
String FirstName = "Ram";
String LastName = "Kumar";
System.out.println(FirstName + " " + LastName);
}
}
K.Thenuga
ReplyDeleteProgramme 05
public class MyClass {
public static void main(String args[]) {
int time = 25;
if (time < 15) {
System.out.println("Hello.");
}
else {
System.out.println("Welcome.");
}
}
}
K.Thenuga
ReplyDeleteProgamme 01
public class MyClass {
public static void main(String args[]) {
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg = 0.0;
double sum = num1 + num2 + num3;
avg = sum/3;
System.out.println("Average: " + avg );
}
}
This comment has been removed by the author.
ReplyDelete// JAMES SUBAS DICT PT
ReplyDelete// Programe 04
public class Name {
public static void main(String args[]) {
String FirstName = "Ram";
String LastName = "Kumar";
System.out.println(FirstName + " "+" "+ LastName);
}
}
// JAMES SUBAS DICT PT
ReplyDelete// Programe 05
public class Hello {
public static void main(String[] args) {
int time = 25;
if (time < 35) {
System.out.println("Hello.");
}
else
{
System.out.println("Welcome.");
}}}
// JAMES SUBAS DICT PT
ReplyDelete// Programe 03
public class SwapElementsExample {
public static void main(String[] args) {
int num1 = 10;
int num2 = 20;
System.out.println("Before Swapping");
System.out.println("Value of num1 is :" + num1);
System.out.println("Value of num2 is :" +num2);
int temp = num1;
num1 = temp;
num2 = num1;
System.out.println("After Swapping");
System.out.println("Value of num1 is :" + temp);
System.out.println("Value of num2 is :" +num2);
}
}
Thakshikan
ReplyDelete01
package myjava ;
public class Average {
public static void main (String[] args) {
double num1 = 10;
double num2 = 15;
double num3 = 20;
double avg = 0.0;
double sum =num1+num2+num3;
avg = sum / 3;
System.out.println ("Average=" +avg);
}
}
Thakshikan
Delete03
package myjava;
public class Swapelements {
public static void main(String [] args) {
int num1 = 10;
int num2 = 20;
System.out.println("Before Swapping");
System.out.println("Value of num1 is :" + num1);
System.out.println("Value of num2 is :" +num2);
int temp = num1;
num1 = temp;
num2 = num1;
System.out.println("After Swapping");
System.out.println("Value of num1 is :" + temp);
System.out.println("Value of num2 is :" +num2);
}
}
Thakshikan
Delete04
package myjava;
public class Firstname {
public static void main (String [] args) {
String FirstName = "Ram";
String LastName = "Kumar";
System.out.println (FirstName + " " + LastName);
}
}
Thakshikan
Delete05
package myjava;
public class Hello {
public static void Main (String [] args) {
int time = 25;
if (time < 15)
{
System.out.println ("Hello.");
}
else
{
System.out.println ("Welcome.");
}
}
}
Bavani
ReplyDeletepublic class average {
public static void main(String args[])
{
double num1=10;
double num2=15;
double num3=20;
double avg=0.0;
double sum=num1+num2+num3;
avg=sum/3;
System.out.println("Average:" + avg);
}
}
Bavani
ReplyDeleteProgram 3
public class swapElementsExample{
public static void main(String args[]){
int num1=10;
int num2=20;
System.out.println("Before swapping");
System.out.println ("Value of num 1 is:"+ num1);
System.out.println ("Value of num 2 is:"+ num2);
int temp=num1;
num1=temp;
num2=num1;
System.out.println("After swapping");
System.out.println ("Value of num 1 is:"+ temp);
System.out.println ("Value of num 2 is:"+ num2);
}
}
BAVANI
ReplyDeletePROGRAM 04
public class main0{
public static void main(String args[]){
String firstName = "Ram";
String LastName ="Kumar";
System.out.println(firstName +"" + LastName);
}
}
Vijayalukshiny.V
ReplyDeleteProgram 5
public class Hello {
public static void main(String[] args)
{
int time = 25;
if (time < 15)
{
System.out.println("Hello.");
}
else {
System.out.println("Welcome.");
}
}
}
package onlinepractices2;
ReplyDelete/**
*
* @author Vimal
*/
public class SwapElementsExample
{
public static void main(String[] args)
{
int num1 = 10;
int num2 = 20;
System.out.println("Before Swapping");
System.out.println("Value of num1 is :" + num1);
System.out.println("Value of num2 is :" +num2);
int temp = num1;
num1 = temp;
num2 = num1;
System.out.println("After Swapping");
System.out.println("Value of num1 is :" + temp);
System.out.println("Value of num2 is :" +num2);
}
}
Programme 04
ReplyDeletepublic class Main {
public static void main(String args[]){
String FirstName = "Ram";
String LastName = "Kumar";
System.out.println("firstName + LastName = " +(FirstName+LastName));
}
}
OR
public class Main2 {
public static void main(String args[]){
String FirstName = "Ram";
String LastName = "Kumar";
String FULLNAME = FirstName+LastName;
System.out.println("FULL NAME IS : " +(FirstName+LastName));
}
}
Programme 04 Correction
ReplyDeletepublic class Main3 {
public static void main(String args[]){
String FirstName = "Ram";
String LastName = "Kumar";
System.out.println("FULL NAME IS : " +(FirstName+LastName));
}
}
PROGRAMME 5
ReplyDeletepackage onlinepractices4;
/**
*
* @author Vimal
*/
public class Main {
public static void main(String[] args) {
int time = 25;
if (time < 15)
{
System.out.println("Hello.");
}
else{
System.out.println("Welcome.");
}
}
}