Questions tagged [implements]

`implements` is a keyword in several programming languages used to denote implementation of an interface.

implements is a keyword in several programming languages which support OOP (such as Java or PHP) used to denote interface implementation (as opposed to extends used to denote implementation inheritance).

Related

404 questions
0
votes
1 answer

How to display "Alarm is set tommorrow" & "I'll wake you up later!" in this java interface program

I couldn't get how to finish this program that was tasked to us and it's about setting an alarm by creating and implementing an interface. This is the instructions that was given to us. Procedure/Instructions Now this is what I finished so far on…
0
votes
2 answers

Understanding Java Enum Methods Implementation through an Example

So, I'm working on a project right now for school with a few people and one of them has committed some code that I'm really having difficulty wrapping my head around. The basis of the project is creating a music library with songs, albums, and…
Appellus
  • 7
  • 1
0
votes
1 answer

Symfony 4.4 + scheb/2fa : Custom code generator and mailer

I'm trying to follow this documentation, but the yaml config throws some errors. I'm don't know Symfony enough to understand what I am doing…
Quezako
  • 35
  • 1
  • 10
0
votes
1 answer

My QuickSort implementation skips the last value

Relatively newbie programmer trying to implement a quicksort algorithm. The partition is always the first in each new array. I run pointers i and j from the left and right side until I find something bigger than the partition with i and smaller than…
RogueNin7x
  • 37
  • 4
0
votes
1 answer

How to access different attributes of different implementation of the same interface

I have an interface public interface Inter { int interAttr = 0; } And two classes that implements it, each one with an additional attribute and each one of different type. @AllArgsConstructor public class Impl1 implements Inter { public…
JacoSolari
  • 1,226
  • 14
  • 28
0
votes
1 answer

Assigning Enum to Field of Implemented TypeScript Class

Let's say we have an enum, "Profession": enum Profession { Teacher = "Teacher", Scientist = "Scientist", Rapper = "Rapper", } And we have a Person interface, which accepts a generic drawn from Profession's values: interface Person

0
votes
1 answer

keep getting an ionotseriaizableexception, what did i do wrong?

So, i have a class which has the following attributes private String name; private int counter; private DateFormat df; private DecimalFormat def; private ArrayList bike; static String[] titles = {"some,items,here"}; all these are already…
acvon
  • 161
  • 3
  • 6
  • 21
0
votes
2 answers

Is there a necessity or a convention of designing some specific class that invokes the methods in our interface

When we create an interface is it enough just to create the interface? or do we have to design another specific class which invokes the methods of the interface? Correction on behalf of the previous edition of this question As pointed in the…
0
votes
1 answer

Google MapView implements OnMapReadyCallback with Kotlin

I use a EmptyActivity and want put a MapView in MainActivity, I think I need implements OnMapReadyCallback, This is my code. package com.example.myapplication import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import…
YIDE
  • 3
  • 2
0
votes
1 answer

How to extend a class in typescript

My service is designed in nodejs. Below is my scenario i have two controllers, one will be extending the other. there is a static function in both the controllers where in a static variable will be assigned some value. depending on the…
The JOKER
  • 453
  • 8
  • 21
0
votes
1 answer

Is it possible to have two different generic types (such as T) in a Java interface?

I'm writing a generic interface representing a processor for several different types of custom objects, each of which is identified by either a string ID or an integer ID. I have written it in a way where T represents my custom objects (which all…
noob
  • 5
  • 4
0
votes
1 answer

Iterate over non-null portion of array in class implementing Iterable

I am experienced in other languages but very new to Java. As an optimisation for a specific situation, I'm trying to implement an iterable container class from an array, as I know my container will hold a maximum of 4 items at a time, and those…
Iron Attorney
  • 1,003
  • 1
  • 9
  • 22
0
votes
1 answer

Java: How to code for items to inherit raw materials' properties?

I am a Java beginner. My problem is, for example: Fire: DMG +1 Stone: DEF +1 By combining to: Fire-stone: fire + stone, and inherit both their properties (DMG 1, DEF 1). Flame: fire + fire, and inherit 2 fire properties (DMG +2). I've played…
mrchoc0
  • 67
  • 5
0
votes
1 answer

Spring Boot - Impossible for JavaFX app to implement SmartLifeCycle?

I am building a JavaFX app and i want it to implement Spring's SmartLifeCycle interface to perform tasks when the main class terminates. A JavaFX main class must extend the Application class which contains a stop() method. The SmartLifeCycle…
Martin
  • 1,977
  • 5
  • 30
  • 67
0
votes
0 answers

Am I overriding the compareTo and toString methods correctly, in my code?

my assignment (in summary) is to override the following methods, in my code: compareTo (interface Comparable), toString (class GeometricObject) and equals (class Object). I am new to Java and am not sure if I am using the @override methods…
Anna Nguyen
  • 33
  • 1
  • 11