|
What result comes when we compile and run following code:
class R4RSCJPTest
{
public void methodTest(int i)
{
System.out.println("Value of i is " +i);
}
public int methodTest(int i)
{
System.out.println("Value of i+1 is " + (i+1));
return (i+1);
}
public static void main(String args[])
{
R4RSCJPTest a = new R4RSCJPTest();
a.methodTest(4);
}
}
,Java, C ,C++, ASP, ASP.net C# ,Struts ,Questions & Answer, Struts2, Ajax, Hibernate, Swing ,JSP , Servlet, J2EE ,Core Java ,Stping, VC++,
HTML, DHTML, JAVASCRIPT, VB ,CSS, interview ,questions, and answers, for,experienced, and fresher
What result comes when we compile and run following code:
class R4RSCJPTest
{
public void methodTest(int i)
{
System.out.println("Value of i is " +i);
}
public int methodTest(int i)
{
System.out.println("Value of i+1 is " + (i+1));
return (i+1);
}
public static void main(String args[])
{
R4RSCJPTest a = new R4RSCJPTest();
a.methodTest(4);
}
}
|