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];
     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"; }
      }
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... will help you learn Hibernate and will explain about hibernate session factory
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 (adsbygoogle
Please explain @interface with an example
Please explain @interface with an example  Here is the code snippet: @Retention(RUNTIME) @Target({ FIELD }) public @interface InjectProperty... = window.adsbygoogle || []).push({}); Could you please explain what does all these mean
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
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
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...")) + " Please input a valid email address."); request.getRequestDispatcher
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... (adsbygoogle = window.adsbygoogle || []).push({}); Please follow
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
Explain - LDAP
Explain LDAP  Any one explain about LDAP ? and also explain about JNDI what relation b/w this two
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 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
Explain ServletContext.
Explain ServletContext.  Explain ServletContext.   Hi, Here is the answer,ADS_TO_REPLACE_1 ServletContext interface is a window for a servlet to view it?s environment. A servlet can use this interface to get
Explain WML
Explain WML  hii, What is WML?   hello,ADS_TO_REPLACE_1 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
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... || []).push({}); for example: print("<logic:iterate id="xid" collection
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.  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
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
Business logic vs Presentation logic - JSP-Servlet
Business logic vs Presentation logic  what is the difference between Business logic and Presentation logic
Explain various access modifiers and their visibility.
Explain various access modifiers and their visibility.  Explain various access modifiers and their visibility.   Please visit the following link: Java Access Modifiers
Explain normalization concept?
Explain normalization concept?  Explain normalization concept
Explain unescape() and escape() in JavaScript?
Explain unescape() and escape() in JavaScript?  Explain unescape() and escape() in JavaScript
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
Struts logic iterate
Struts logic iterate  This is my jsp page in which i used 3 logic...; <%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>...; <body> <h1> Search </h1> <logic:iterate name
Explain Hibernate Relationships with example.
Explain Hibernate Relationships with example.  Hello, Please explain various hibernate relationships. And if you can provide some examples that would be a great help.. Thank you.... (adsbygoogle = window.adsbygoogle
What is programming logic ?
What is programming logic ?  What is programming logic
Logic - JDBC
and displaying on my jsp page.. Thanks   Hi Friend, Please
ModuleNotFoundError: No module named 'explain'
ModuleNotFoundError: No module named 'explain'  Hi, My Python... 'explain' How to remove the ModuleNotFoundError: No module named 'explain... to install padas library. You can install explain python with following command
WEB LOGIC - JSP-Servlet
WEB LOGIC project  I want the procedure to run a project in we logic server
the business logic is executed.
the business logic is executed.  In which method of Action class the business logic is executed
leap year logic - Java Beginners
leap year logic  hi frds.. can u give me logic for leap year..  Hi Friend, Please visit the following link: http://www.roseindia.net/java/beginners/Leapyear.shtml Thanks
ModuleNotFoundError: No module named 'logic'
ModuleNotFoundError: No module named 'logic'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'logic' How to remove the ModuleNotFoundError: No module named 'logic'
what is the logic of this pattern?
what is the logic of this pattern?   1 121 12321 1234321
java please please help
java please please help  Dear Friends plz help me to complete this program import java.util.*; public class StringDemo { static String a="{a=100;b=200;c=300}"; public static void main(String args
Explain types of java programs
Explain types of java programs  Explain types of java programs   Types of Java Programs: Standalone Applications Web Applications Enterprise Applications Console Application Web services
ATM Logic - Java Beginners
ATM Logic   Q-In an ATM program i want to print the receipt in which there is information of rupees note that come out from an ATM machine when user... rupee note and so on. PLEASE GIVE ME THE CODE FOR THIS. AshishChaudhary
Explain struts.jar file - Struts
Explain struts.jar file   Hi friends am new to java. I read jar file means collection of java files. For executing struts application what are the necessary jar files. " struts.jar " file contains what. can u explain
Explain Transparent Persistence - Hibernate
Explain Transparent Persistence   Hi Friends, Can u plz explain Transparent Persistence briefly  Hi Follow this link to find solution of your problem... http://www.roseindia.net/jdotutorials/jdo
struts logic tags
struts logic tags  what is the use of struts logic tag   The purpose of Struts logic tags is to alter output depending on the given.../struts-logictags/logic-tags-introduction.shtml http://www.roseindia.net/struts
Version of com.thesett>logic dependency
List of Version of com.thesett>logic dependency

Ads