saurabh sanyal
calling method
1 Answer(s)      3 years and 8 months ago
Posted in : Java Beginners

View Answers

September 10, 2009 at 3:46 PM


Hi Friend,

Try the following code:

class A{
public void fo(){
class B{
public void fo1(){
System.out.println("fo1 of class B");
}
}
System.out.println("fo of class A");
}
class C{
public void fo2(){
System.out.println("fo2 of class C");
}
}
}
class D{
public static void main(String args[ ]){
A a=new A();
a.fo();
}
}

Thanks









Related Pages:
calling method - Java Beginners
calling method   class A{ public void fo(){ class B{ public void fo1(){ System.out.println("fo1 of class B... static void main(String args[ ]){ } } I Want to call method fo1
Calling a function
Calling a function  Hi, I have a function xyz() in php code. When a button is clicked it should execute that particular function for that i have written as <form action="<?=$_SERVER['PHP_SELF'];?>" method="post">
Calling Destructor
Calling Destructor  How can i call destructor in java using System.gc.... There is an inherited method called finalize for Garbage Collection. import java.io.... FinalizeFileOutputStream(); // finalize() method call. objOutstream.finalize
instead of calling an individual ResultSet.getXXX method for each column.
instead of calling an individual ResultSet.getXXX method for each column.  How do I retrieve a whole row of data at once, instead of calling an individual ResultSet.getXXX method for each column
Calling java class method from javascript
Calling java class method from javascript  I want to call a java class method from javascript. The java class method is like "public String[] getWord()". I want to assign this string array value to a variable in javascript. I
php calling variables
php calling variables  Can i call a member variable of a class using static method in php
Calling hibernate query list() method generates errors
Calling hibernate query list() method generates errors  Hello, I'm trying to debug someone's codes. But I am not an expert of hibernate so I'm asking your help about this. I am trying to retrieve a list of jobs from
Calling Action on form load - Struts
Calling Action on form load  Hi all, is it possible to call... this list is coming from the action which i m calling before the page is being... to direct user directly to this page i m calling an action which is preparing a list
Get Calling Method
Get Calling Method       In this example we will find the name of the method. Description of the method used in the example: getStackTrace: Provides programmatic access
Methods - Calling
to the caller. Calling a method When you call a method... to make it clear that you are calling the method with the current object. [needs... Java Notes Methods - Calling
Calling Namespace
Calling Namespaced Code From Other File: In the previous tutorial we have seen that how to declare a namespace and how to access the class, function from... { function myMethod() { echo __METHOD__; } } ?> Lib2.php
How to change the value of a variable which is set in jsp (by jstl method) by calling the function from js?
How to change the value of a variable which is set in jsp (by jstl method) by calling the function from js?  How to change the value of a variable which is set in jsp (by jstl method) by calling the function from js? I set
calling webservices that return complexTypes in android using ksoap2
(); } } } }"); The webservice method i am calling retuns...calling webservices that return complexTypes in android using ksoap2   Here's my code for android application,to call aweb service method and return
calling java method from html form with out using javascript - JSP-Servlet
calling java method from html form with out using javascript  How can i call java method from a HTML form, java script should be disabled?  Hi <html><head><title>Test Input Validation</title><
Implement Java clients calling Web Services
Implement Java clients calling Web... clients calling Web Services Generating a Java client proxy and a sample... the setEndPoint() method to set an endpoint URL before you call any other method
calling one jsp from another jsp - JSP-Servlet
is just like calling a method() in the java/c++/c classes. It will call the method...calling one jsp from another jsp  Hi All, In my web application I have two jsp files(one.jsp and two.jsp). I have written a seperate method
video calling
video calling  how to implement video calling using java? i am a final year mca student please give me some samplecodes
video calling
video calling  how to implement video calling using java? i am a final year mca student please give me some samplecodes
Get Calling Class
Get Calling Class       In this example we will find the name of the class name. Description of the method used in the example: getStackTrace: Provides programmatic access
Calling In JavaScript Functions from HTML Form To Validate User Entered Data
Calling In JavaScript Functions from HTML Form To Validate User Entered Data  Hello, I have been working for days on my web Form assignment..." action="" method="post" id="form1"><!--form1 sets style of subscription
how to start intergrated webcam of a laptop without calling its exe file using java only - Java Beginners
how to start intergrated webcam of a laptop without calling its exe file using java only  how to open integrated webcam of a laptop without calling its exe file using java only?.simply what i am asking is that is there any method
init Method in Spring
init Method in Spring       Calling Bean using init() method in Spring, this section... the init() method .Here we have defined the property and values of  the bean
init Method in Spring
init Method in Spring       Calling Bean using init() method in Spring, this section describes ...() method .Here we have defined the property and values of  the bean using
JavaScript deleteTFoot method
then we can delete this table footer by calling the JavaScript method with the table object. Syntax for using deleteTFoot() method is as follows: Syntax... JavaScript deleteTFoot method   
Calling ( Invoking ) Methods through Reflection
Calling ( Invoking ) Methods through Reflection... Method. Now in this section of the tutorial you will come to know that we can also... in case of no-argument method noting to worry just simply get class of that object
Calling another web resources
Calling another web resources In this tutorial you will learn how a web... component has called is an indirect way of calling by including an URL...;) method. This method will return null if either the requested resource
calling servlet from jsp
calling servlet from jsp  how to call a servlet from jsp
Calling Methods Using SpEL
Calling Methods Using SpEL Spring 3 provides powerful Expression Language which can be used to wire values into beans properties by calling method of any... by calling methods. Person.java: The Person class contains property named "
calling a java file in java
calling a java file in java  how to call a another java file in java
Sending form data from HTML page to SQLserver 2005 database by calling servlet code
Sending form data from HTML page to SQLserver 2005 database by calling servlet... from html page to database by calling servlet code from html page .   ...;center><h3>Registration Form</h3></center> <form method
Calling from JSP
Calling from JSP  how can we call a class file from JSP   Hi, Do you want to call a servlet or a Java Bean through JSP? Please clarify this. For more information, visit the following link: JSP Tutorials Thanks
Calling servlet from servlet .
Calling servlet from servlet .  How to call a servlet from another... ServletException, IOException { System.out.println("Calling another servlet by using...); System.out.println("Calling another servlet by using SendRedirect
calling function - JSP-Servlet
calling function  Hai, How to call a java file in jsp file?  Hi friend, Step to be remember for solving the problem : 1.Create a jsp page "test.jsp" Example of Extends Attribute of page
calling setInterval() on onclick event
calling setInterval() on onclick event  Hi all, I am trying to call setInterval() on onclick event. But it is executing the code only once. Following is my code. <script type="text/javascript" language="javascript">
Calling Static Methods Using SpEL
Calling Static Method Using SpEL Spring 3 provides powerful Expression Language which can be used to wire values into beans properties by calling static... to demonstrate how SpEL is used to wire value by calling static  method
Calling Constructor in Spring
Calling Constructor in Spring       In the given example you will be learning about a constructor and how to call a constructor in the Spring. Declaring constructor injection
method overloading - Java Beginners
method overloading   Write a program to demonstrate the method...: calling sumload(10,20,30) { int n=a+b+c; System.out.println("Sum:"+n... is referred to as Method Overloading. In the given example, we have defined
Method overloading in java program
are passing two char type parameters. In main method we are calling the all three...Method overloading in java program  How can we use method overloading in java program?   Method overloading:?In method overloading methods
Use of delete() method in hibernate.
Department and the deptId. Now you can delete record by calling delete method...Use of delete() method in hibernate.  Define the use of delete() method of hibernate?   Hibernate provide the facility to delete one row
what is web .config method
*The servlet is initialized by calling the init () method. *The servlet calls... by calling the destroy() method. *Finally, servlet is garbage collected by the garbage...,call the service method and finally destroy it. Servlet config is an object
Calling Flex Function From JavaScript
; } .style4 { border-style: solid; border-width: 1px; } Calling Flex Function...:Application> To Call Flex method from JavaScript do the following
When is java main method called?
, the runtime system starts by calling the class's main() method. The main() method...When is java main method called?  When is java main method called? Please explain the main method in Java with the help of code.   
Server calling of .exe file in the client
Server calling of .exe file in the client   I have a requirement with java webapplication. We are using jboss as appserver on Linux machine. How can I call a .exe file from client machine? I want to run .exe from webpage like
init Method in Spring
init Method in Spring       Calling Bean using init() method in Spring, this section describes ...() method .Here we have defined the property and values of  the bean using
calling java beans - JSP-Servlet
calling java beans  Sir, I want to know where to place the java beans java file and class file inside tomcat web server. and how to call them from jsp file.  Hi Friend, Java Bean is placed in classes\form
JavaScript sup method
JavaScript sup method       In the JavaScript, method sup() method is used to format text... and there after we have converted the string into superscript format by calling
Calling a jsp page from Servlet
Calling a jsp page from Servlet  How can I do this? Suppose I have jsp page aaa.jsp. From aaa.jsp on form action I have made a call to a servlet xxx.java. In xxx.java I have written code to retrieve data from database through
method
method   how and where, we can define methods ? can u explain me with full programme and using comments
calling zipping function - JSP-Servlet
calling zipping function  Hi, Is it possible to zip a jsp file. I wrote a java function for zipping a file.How to call that java file (zipping function ) in JSP ? pls help me Thanks.... 
Java Thread : sleep() method
"); } } Output : Thread-0 Calling sleep() method... Thread-1 Calling...Java Thread : sleep() method In this section we are going to describe sleep() method with example in java thread. sleep() method : Suppose you want

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.