Waiting for ur quick response

Ads

 
 

Share on Google+Share on Google+

SARATHKUMAR M
Waiting for ur quick response
0 Answer(s)      5 years and a month ago
Posted in : Java Beginners

Hi,

I have two different java programs like sun and moon. In both of these two programs i have used same class name like A. For example,

File name:sun.java
Then the code is here:
Class A
{
public static void main(String args[])
{
System.out.println("Hai");
}
}

Then i have to compile it:

javac sun.java
It compiles successfully then i have to run it
java A
The output is: Hai
This part is completed. Now i ll go to the next program

File name:moon.java
Then the code is here:
Class A
{
public static void main(String args[])
{
System.out.println("Hello");
}
}

Then i have to compile it:

javac moon.java
It compiles successfully then i have to run it
java A
Now the output is: Hello

Now i want to get the result as "Hai", so i run the file named as sun.java.
But this time again i got the result as "Hello"
What is the reason for this type of happening? and what is the solution for this problem? and how will i get the output "Hai"? Please any one help me ASAP....

Thanks!!!

Ads
View Answers
Ads









Related Tutorials/Questions & Answers:
Waiting for ur quick response
Waiting for ur quick response  Hi, I have two different java programs like sun and moon. In both of these two programs i have used same class name like A. For example, File name:sun.java Then the code is here: Class
Hi and Thanks for ur response - Hibernate
Hi and Thanks for ur response  Hi, thanks for ur immediate response.Could anyone know abt the elements generated by generic DAO classes and pls let me know what is persistenceInstance with one good example. pls explain me
Advertisements
i need a quick response about array and string...
i need a quick response about array and string...  how can i make a dictionary type using array code in java where i will type the word then the meaning will appear..please help me..urgent
s per ur answer
s per ur answer  i cannot understand please explain in detail 3)Create web.xml and classes folder inside the WEB_INF folder of web application folder.   Hello Friend, We were explaining you the directory structure
quick sort
quick sort  sir, i try to modify this one as u sugess me in previous... static void quick_srt(int array[],int low, int n){ int lo = low; int hi... = lo; lo = T; } quick_srt(array, low, lo); quick_srt(array
quick sort
quick sort  sir, i try to modify this one as u sugess me in previous... static void quick_srt(int array[],int low, int n){ int lo = low; int hi... = lo; lo = T; } quick_srt(array, low, lo); quick_srt(array
quick sort
quick sort  sir, i try to modify this one as u sugess me in previous... static void quick_srt(int array[],int low, int n){ int lo = low; int hi... = lo; lo = T; } quick_srt(array, low, lo); quick_srt(array
Reply to ur mail(Hibernate Error)
Reply to ur mail(Hibernate Error)  Hi! Im using Eclipse. Steps : 1. Downloaded the example code and library from rose india and extracted the content in a directory. 2. Downloaded file contains the Eclipse project. 3. Started
diplay response
diplay response   Sir, How show sum of two tex boxes data to third box   Answer
JSP Response Object
JSP Response Object  JSP response Object ?   The response object denotes the HTTP Response data. The result or the information of a request is denoted with this object. The response object handles the output
php parse soap response
php parse soap response  What is soap and how can i convert a soap response to XML. Thanks in Advance
Version of com.codesnippets4all>quick-json dependency
List of Version of com.codesnippets4all>quick-json dependency
How to make one waiting thread for lock - Java Beginners
How to make one waiting thread for lock  Hi Friends, I am new to java. Can u explain about thread concept.How i know one thread is locked, and how can i force or acquire another thread for lock . Finally how to know thread
problem in forwarding response
problem in forwarding response  My response is not getting displayed. i have used RequestDispatcher.forward,RequestDispatcher.include...,Update page has fields with the values.after user clicks on update button,response
Version of taglibs>response dependency
List of Version of taglibs>response dependency
Server_Gives_Null_Response
at port 6066. My Problem is that when i send response from server (port 6066... the server. Kindly give the solution how can i get response at client class. I
Struts Quick Start
Struts Quick Start Struts Quick Start to Struts technology In this post I will show you how you can quick start the development of you struts based project... of the application fast. Read more: Struts Quick Start
Version of taglibs>response-doc dependency
List of Version of taglibs>response-doc dependency
Version of taglibs>response-examples dependency
List of Version of taglibs>response-examples dependency
Version of com.sunrun>cfn-response dependency
List of Version of com.sunrun>cfn-response dependency
Quick Sort In Java
Quick Sort in Java      ... to sort integer values of an array using quick sort. Quick sort algorithm is developed by C. A. R. Hoare. Quick sort is a comparison sort. The working
Version of com.ineat-group>quick-adapter dependency
List of Version of com.ineat-group>quick-adapter dependency
Please help need quick!!! Thanks
Please help need quick!!! Thanks  hey i keep getting stupid compile errors and don't understand why. i'm supposed to use abstract to test a boat race simulation program of sorts here is my code: RentforthBoatRace.java public
Maven Dependency quick-json >> 1.0.4
You should include the dependency code given in this page to add Maven Dependency of com.codesnippets4all >> quick-json version1.0.4 in your project
How to extract values from SOAP Response message and insert in database
please help me on this? Your quick response will be highly appreciated...How to extract values from SOAP Response message and insert in database ... values from SOAP Response XML (i.e. Empname,EmpID,Phnumber) but I don't have any
Maven Dependency quick-adapter >> 1.0.1
You should include the dependency code given in this page to add Maven Dependency of com.ineat-group >> quick-adapter version1.0.1 in your project
Maven Dependency quick-adapter >> 1.0.2
You should include the dependency code given in this page to add Maven Dependency of com.ineat-group >> quick-adapter version1.0.2 in your project
Maven Dependency quick-adapter >> 1.0.0
You should include the dependency code given in this page to add Maven Dependency of com.ineat-group >> quick-adapter version1.0.0 in your project
how to display response in request page
how to display response in request page  Sir/Mom, My request page have three text boxes. Enter register number in the first box then click the submit button.This time shows the name and mark to display the second and third boxes
Tomcat Quick Start Guide
Tomcat Quick Start Guide       This tutorial is a quick reference of starting development application using JSP, Servlets and JDBC technologies. In this quick and very
Version of com.etsy>sbt-compile-quick-plugin dependency
List of Version of com.etsy>sbt-compile-quick-plugin dependency

Ads

 
Advertisement null

Ads