Animal is a superclass  Feline is a subclass of Animal  Cat is a subclass of Feline  Canine is a sublcass of Animal  Dog is a subclass of Canine  All of the classes have their own eat() method that outputs:  "(class) is eating"  I've already tried creating an array of Animals, looping through them, and calling the eat() method, which outputs the proper output for each given animal.  My question is, what does one gain by doing this:    Cat j = new Animal();   wouldn't Cat j = new Cat() do anything you need do regarding methods with Animal types, since it's already an animal through inheritance?   Edit: I'm sorry, I meant it the other way around--what does one gain by declaring:  Animal j = new Cat();   sorry!
I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?
Whenever I try to cut out a circular hole in either a cylinder or sphere the polygons around the circular hole always have distorted normals after smoothing. Is there anyway to fix this. I've tried using the remesh modifier but wind up with some pretty ugly results. While deploying code in vsCode from sandbox to production I get the below error      sf:INVALID_OPERATION: INVALID_OPERATION: testLevel of NoTestRun cannot   be used in production organizations   As per the error, I need to change the value of testLevel but I am not able to find where and how can I change it to RunLocalTests  Could someone please help me to change the value of testLevel in vsCode New questions, Show Recommended, Sort Newest not working How to use Class in Java? There's a good discussion of Generics and what they really do behind the scenes over at , so we all know that Vector&lt;int[]&gt; is a vector of integer arrays, and HashTable&lt;String, Person&gt; is a table of whose keys are strings and values Persons.  However, what stumps me is the usage of Class&lt;&gt;.  The java class Class is supposed to also take a template name, (or so I'm being told by the yellow underline in eclipse).  I don't understand what I should put in there.  The whole point of the Class object is when you don't fully have the information about an object, for reflection and such.  Why does it make me specify which class the Class object will hold?  I clearly don't know, or I wouldn't be using the Class object, I would use the specific one. Independent samples t-test with unequal sample sizes I have two independent groups: from one I have drawn a sample of size less than 30 due to its small population, while the second group has sample size 100.  Is it appropriate to use an independent samples t-test in this case? I'm currently in the process of making a custom map and I want to add blocks that can only be placed on a certain colour clay.  This is the command I tried using.  /give @p cobblestone 1 0 {CanPlaceOn:["hardened_stained_clay"],Damage:3}   However, even with this command the cobblestone can be placed on any colour of stained clay. What command can I use for placing only on a certain block? Is it possible to extend a tourist Schengen visa (12 more days)? My daughter applied at the Italian Consulate in Philadelphia, and they gave her two entries for 20 days (we thought it was for 20 days each entry). She was in Italy 12 days, then went to England for 1 week and flew to Venice to take a 10-day cruise. She couldn't make it because they said she has only 8 remaining days, but she still has a land tour already paid this week.  What can she do? Can she extend the Schengen visa for 12 more days? Right now, she is in Madrid, but next week she has to fly from Barcelona to Paris to start with the tour. What would happen if she decides to take the tour with the expired visa? She is a US permanent resident. How would gravity change on a planet rotating around itself very fast? Let's take a planet identical to Earth, but with rotation speed multiplied by ten thousand. What would happen with the gravity if it was spinning madly around itself? Would the centrifugal force make objects seem lighter than on normal Earth? Would the people on that planet be able to jump higher? I got this $$ f=a(x-1)(x-2)...(x-101) $$ knowing a and that $1 ,2 \ldots ,101$ are it's roots ... I need the roots of $f'$ , how should I do it ? More specifc how can I derivate a polynomial like that, is there a formula or something ? Finding probability of other child also being a boy A man visits a couple who have two children.One of them, a boy, comes in to the room. Find the probability p that other is also a boy  a) 1/3 b) 2/3 c) 1/2 d) 3/4  Correct Ans: a) 1/3  However I am getting answer as 1/2.My solution is as follows.  The couple has two children, hence the sample space is as follows.  B- Boy G - Girl  BB BG GG ( BG and GB mean the same thing as Girl,Boy), but it is already known that one is boy.So the sample space reduces to  BB BG  So now p is 1/2  Is there some mistake is my approach ? I applied for a 90-day visa and got a long-term visit, single-entry tourist visa. The date given is 09-March-2015, and it's valid until 07-May-2015.  My agent says the 7th is the latest date I can travel to Dubai; once I enter I need to count 90 days. I entered on the 10th of March.    Is it true, or where can I get it checked?    Can I stay for another month, or do I need to leave before the 7th of May? Winter 18  does not get values from a parent record I am testing the new  &lt;lightning:datatable&gt;, it is really good, and is a good replacement for most of my use cases which today I use a custom list component that I have developed.  I am getting data from my server through apex method, to populate it into the &lt;lightning:datatable&gt; component. I can bind the returned list directly to the data attribute and if the column names are same as the field names, all data is bound correctly.  The problem occurs when I get data from a parent record. For example - I want the Account name of my contact.  This example can show the problem:  Component Markup    &lt;aura:handler name="init" value="{!this}" action="{!c.doInit}"/&gt;  &lt;aura:attribute name="mydata" type="Object"/&gt; &lt;aura:attribute name="mycolumns" type="List"/&gt; &lt;aura:attribute name="sortedBy" type="String"/&gt; &lt;aura:attribute name="sortedDirection" type="String"/&gt;  &lt;lightning:datatable data="{! v.mydata }"                      columns="{! v.mycolumns }"                      keyField="Id"                      onrowselection="{! c.getSelectedName }"                      onsort="{!c.updateColumnSorting}"                      sortedBy="{!v.sortedBy}"                      sortedDirection="{!v.sortedDirection}"                      hideCheckboxColumn="{!false}" /&gt;        Component Controller  ({     doInit: function (component, event, helper) {         component.set('v.mycolumns', [                     {label: 'Id', fieldName: 'Id', type: 'id', sortable:"true"},                     {label: 'First Name', fieldName: 'FirstName', type: 'text', sortable:"true"},                     {label: 'Last Name', fieldName: 'LastName', type: 'text', sortable:"true"},                     {label: 'First Name Hebrew', fieldName: 'First_name_Hebrew__c', type: 'text', sortable:"true"},                     {label: 'Last Name Hebrew', fieldName: 'Last_name_Hebrew__c', type: 'text', sortable:"true"},                     {label: 'Account', fieldName: 'Account.Name', type: 'text', sortable:"true"},                     {label: 'Email', fieldName: 'Email', type: 'email', sortable:"true"},                     {label: 'Phone', fieldName: 'Phone', type: 'phone', sortable:"true"}                 ]);          var action = component.get("c.getRecordsFromDb");         action.setParams({             sObjectName: "Contact",             commaDelimitedFieldNames: "Id,FirstName,LastName,First_name_Hebrew__c,Last_name_Hebrew__c,Account.Name,Email,Phone",             filter: ""         });         action.setCallback(this, function(response){             var state = response.getState();             if (component.isValid() &amp;&amp; state === "SUCCESS") {                 var data = response.getReturnValue();                  component.set("v.mydata", data);             }         });         $A.enqueueAction(action);     } })   APEX Aura Enabled Method  @AuraEnabled public static List&lt;sObject&gt; getRecordsFromDb(String sObjectName,         String commaDelimitedFieldNames,         String filter) {      system.debug('\n\n\n\ngetRecordsFromDb sObjectName: ' + sObjectName + ', commaDelimitedFieldNames: ' + commaDelimitedFieldNames + ', filter: ' + filter + '\n\n\n\n');      // create a dynamic soql to get the value of the field     String sql = 'SELECT ' + commaDelimitedFieldNames + ' FROM ' + sObjectName;      if (!String.isBlank(filter))         sql += ' WHERE ' + filter;      system.debug('\n\n\n\ngetRecordsFromDb sql: ' + sql + '\n\n\n\n');     List&lt;sObject&gt; records = Database.query(sql);     system.debug('\n\n\n\ngetRecordsFromDb: ' + records + '\n\n\n\n');      return records; }   The problem is with the Account.Name field - the &lt;lightning:datatable&gt; component does not display the column data.   I know that the data is returned ok, and I know that in the object that is returned, the Account is contained like an object (probably this is the problem):    Is there a good way to show parent record data with this component? This works:   This does not (blank image):   Notice the 1.1.1 -> 1.3.0 and SRS->CRS are the only changes.  Is this a problem with the service or is my second URL incorrect?  I've observed the same issue with other WMS services:  Works:   Does not work (blank image):   So I'm assuming it's an issue with my 1.3.0 URLs. What is a word that could define someone who likes to cause conflict? Can I use film that's 20+ years old? Make font size bigger than max limit of 1296 pt in Adobe Illustrator (2015)? For some reason and for many years there's a limit for font size in Illustrator. It is 1296 points max, so you can't go bigger without converting type to outlines first. Converting to outlines means you will not be able to edit type parameters and text it-self. Don't know how about you, but this makes me sad in non-destructive editing era.  What's your workaround? Let $D = B(0,1) \subset \mathbb{C} $ a disc, $f$ holomorphic on $D$. I want to demonstrate that if $$ 2|f^{'}(0)| = \sup_{z, w \in D} |f(z)-f(w)|$$  then $f$ is linear.   I know this is a well-known result. Where can I find the proof ? Positivity of a determinant I'm stuck to prove the following exercise : Given real numbers $x_1,\ldots,x_n$ and $y_1,\ldots,y_n$, show that  $$ \det(e^{\large{x_iy_j}})_{i,j=1}^n&gt;0 $$ provided that $x_1&lt;\cdots&lt;x_n$ and $y_1&lt;\cdots&lt;y_n$.   Any idea ? How to generate PDF/A and PDF/X? I have heard about PDF  PDF/A (for archival) and PDF/X (for printing). How to generate LaTeX documents like that?  I'm also interested in answers with plain TeX and ConTeXt, and hopefully with both pdfTeX and XeTeX engines. Prove that the equation $x^2-y^2 = 2002$ has no integer solution