Mallareddy Belageri
Please explain the logic....
0 Answer(s)      4 years and 2 months ago
Posted in : Java Beginners
class A1 { }
 class B extends A1 { }
 public class ComingThru {
   static String s = "-";
   public static void main(String[] args) {
     A1[] aa = new A1[2];
     B[] ba = new B[2];
     sifter(aa);
     sifter(ba);
     sifter(7);
     System.out.println(s);
   }
   static void sifter(A1[]... a2)    { s += "1"; }
      static void sifter(B[]... b1)    { s += "2"; }
      static void sifter(B[] b1)       { s += "3"; }
      static void sifter(Object o)     { s += "4"; }
      }
Advertisement
View Answers









Related Tutorials/Questions & Answers:
Please explain the logic....
Please explain the logic....  class A1 { } class B extends A1 { } public class ComingThru { static String s = "-"; public static void main(String[] args) { A1[] aa = new A1[2]; B[] ba = new B[2
please explain this program
please explain this program  public class MainClass { public static void main(String[] args) { System.out.println("Java
Advertisements
Please explain Hibernate Sessionfactory.
Please explain Hibernate Sessionfactory.  Hi there, Please explain Hibernate session factory in detail. I have just started learning hibernate so i..., the tutorials here will help you learn Hibernate and will explain about hibernate
Please explain @interface with an example
Please explain @interface with an example  Here is the code snippet...) private Runnable runnable; where Runnable is an interface. Could you please explain what does all these mean? How all these work
Please explain @interface with an example
Please explain @interface with an example  Here is the code snippet: @Retention(RUNTIME) @Target({ FIELD }) public @interface InjectProperty... runnable; where Runnable is an interface. Could you please explain what does
please explain this prog
please explain this prog  can u explain this import java.io.*; class SString{ public static void main(String ar[]) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in
Logic error? HELP PLEASE! :(
Logic error? HELP PLEASE! :(  Hello Guys! i have a huge problem. What... your saved Quick Quotes, please enter your Email Address...("emailAddress")) + " Please input a valid email address
please explain this prog
please explain this prog  import java.io.*; class Studar{ public static void main(String ar[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System.out.println("how many
Please explain me the flow of this program..
Please explain me the flow of this program..  // Substring replacement. class StringReplace { public static void main(String args[]) { String org = "This is a test. This is, too."; String search
please explain me the flow of this program
please explain me the flow of this program  class Bticket extends Thread { Object train,comp; Bticket(Object train,Object comp){ this.train=train; this.comp=comp; } public void run(){ synchronized
Please explain what is hibernatetemplate with an example code.
Please explain what is hibernatetemplate with an example code.  hi, Please explain Hibernate template example code to me..   Hello Friend... is org.springframework.orm.hibernate.HibernateTemplate Please follow the given link for more details: hibernateTemplate
Please write code for this program in java and Explain it ? pl'sssssssss
Please write code for this program in java and Explain it ? pl'sssssssss  Question: We are given an array of 2n integers wherein each pair in this array of integers represents the year of birth and the year of death
403 Forbidden error - What is 403 Forbidden error, please explain...
403 Forbidden error - What is 403 Forbidden error, please explain...  Can anyone please explain, What is 403 Forbidden error. And how can i remove this error, which is restricting my page from loading it. Thanks!!   Hi
In tag files,does attribute values accept expressions or not? If not please explain the reason
.... could any body explain this please............** HTTP Status 500 - type...In tag files,does attribute values accept expressions or not? If not please explain the reason  **Actually when i do manually in tomcat server
403 Forbidden error - What is 403 Forbidden error, please explain...
403 Forbidden error - What is 403 Forbidden error, please explain...  Can anyone please explain, What is 403 Forbidden error. And how can i remove this error, which is restricting my page from loading it. Thanks!!   Ok
Please explain this code as many packages and classes are unknown to me .!
Please explain this code as many packages and classes are unknown to me .!  print("code sample");package bluetooth; import java.io.OutputStream; import javax.microedition.io.Connector; import javax.obex.ClientSession; import
LOGIC
LOGIC  hey guys..i have my exams coming in somedays and it would be really helpful if someone explained how to develop the logic of any program
LOGIC
LOGIC  hey guys..i have my exams coming in somedays and it would be really helpful if someone explained how to develop the logic of any program
Logic and desgin
Logic and desgin  How would this be put in visual logic symbol
Logic Building
Logic Building  I wanted to devlop my logic ? How can i do so ? Can i start with java or i need to do c++ before
Logic and Degin
Logic and Degin  Need help in writing a pseudocode for this can so please help me with this just need to get started. In this lab, you are going to extend the Fireworks Checkout Stand application in Week 6. This week, we
Logic Iterate.
Logic Iterate.  I have one doubt about logic:iterate. I use text feild inside of logic:iterate , there is possible will generate N no of rows (text feild) inside of iterate. my doubt is how to get the Paritcular rows text
Logic Iterate.
Logic Iterate.  logic iterate Struts I have one doubt about logic:iterate. I use text field inside of logic:iterate , there is possible... the Particular rows text value. for example: print("<logic:iterate id="xid
Explain - LDAP
Explain LDAP  Any one explain about LDAP ? and also explain about JNDI what relation b/w this two
Logic and Design
Logic and Design  Please help me with this Write a program that prompts and accepts a number between 1 and 12. After getting the input, display... is: "+getMonthForInt(num)); } }   //please reply if my post
logic-iterate
logic-iterate  in my code i am using for-each loop for displaying data i want use tag to display data how to use plase help me <%@ page import="java.sql.*" %> <%String[] id = (String[])session.getAttribute("ids
Business logic vs Presentation logic - JSP-Servlet
Business logic vs Presentation logic  what is the difference between Business logic and Presentation logic
Explain ServletContext.
Explain ServletContext.  Explain ServletContext.   Hi, Here is the answer, ServletContext interface is a window for a servlet to view it?s environment. A servlet can use this interface to get information
Logic - JDBC
and displaying on my jsp page.. Thanks   Hi Friend, Please
Explain WML
Explain WML  hii, What is WML?   hello, WML stands for Wireless Markup Language. It is a simple language used to create applications for small wireless devices like mobile phones. WML is analogous to HTML
explain this method
explain this method   i hope any one can explain this method ` private void showMonth(int m, int y) { int lead_spaces = 0; if (m &lt; 0 || m > 11) { System.out.println("It should be 1 to 12