Questions tagged as 'interface'

2
answers

How and when should we use Interface to document systems in PHP?

I've always wanted to know exactly, if it's a good practice, to make a system always using Interfaces, or is it not necessary? Interface People { public function getName(); public function setName($string); public function getAge(); pu...
asked by 26.11.2015 / 12:45
3
answers

Is it correct to say which interface solves the problem of multiple inheritance in Java?

It is known that Java does not support multiple inheritance . Is it correct to say that the interface concept solves the problem of multiple inheritance in Java? If so, why?     
asked by 27.09.2015 / 05:49
6
answers

Why can not I define an interface with static methods?

I would like to force some of my classes to be implemented in Singleton, but I came across the following situation. interface ICharacterSingleton{ static Characters getInstancia(); } public static class Zero extends Characters implements...
asked by 18.07.2014 / 00:07
2
answers

Instantiate interface - What's the use? [duplicate]

I learned in college and in all materials that I saw that the interface serves to define a standard that classes should follow and interfaces can not be instantiated. However I came across projects that have an interface and a class that imple...
asked by 16.08.2016 / 02:39
1
answer

Java Interface 8

Java 8 allows you to implement methods in the interface itself. So I would like to know what an abstract class can do that an interface can not. Source: link     
asked by 01.10.2015 / 22:25
3
answers

Interface or Abstract?

I've read a lot of content on this topic until I get to this example: public interface Funcionario{ public void trabalha(); public void recebe(double salario); } public abstract class Geek implements Funcionario{...
asked by 08.10.2014 / 21:27
5
answers

Difference between transporting data in JSON and String

I'm finishing building a site in PHP with the MVC architecture, the next step is to integrate the application (which only has the interface) with the core ( controller ) site, to fetch information from the database. data. Thi...
asked by 17.05.2016 / 05:06
3
answers

Programming for the interface means programming for a super type, why?

When programming interface-oriented does it imply programming for a super-type? What is the meaning of this?     
asked by 17.09.2015 / 18:33
1
answer

Classes that implement interfaces are considered subclasses?

I have an interface Veiculo , a class Peugeot that implements Veiculo . This Peugeot is considered subclass?     
asked by 12.09.2016 / 02:47
2
answers

Why are implemented methods of an interface can not be private?

When I implement an interface in my class, why its implemented methods can not be private / protected / etc? And another doubt, when I implement an interface method explicitly, why can not this method be public ? Example: interface...
asked by 17.04.2015 / 00:27