So polymorphism is the act of inheriting a class and overriding methods from it/adding to it, so making a class based on another. And as polymorphism means many forms, we call this polymorphism...
Type: Posts; User: TP-Oreilly
So polymorphism is the act of inheriting a class and overriding methods from it/adding to it, so making a class based on another. And as polymorphism means many forms, we call this polymorphism...
Hi,
Im just trying to get the right idea about polymorphism.
Is polymorphism simply the act of inheriting an abstract class and defining the methods yourself. As polymorphism means many forms,...
Thanks. :)
Hi, in my code I have
public boolean equals(Object obj) {
if (this.equals(obj)){
return true;
}
return false;
}
I found out why....
The format of the sound file was .wav, i changed it to a .mp3 and now it sounds as it should.
Hi,
I have:
final MediaPlayer mp = MediaPlayer.create(this, R.raw.popping_sound_effect);
When I play the sound file it is how I want it to be, but when I run the app and making the...
I got it working now, just to let you know why it wasnt working:
I changed this:
public class BackgroundService extends Service{
@Override
public IBinder onBind(Intent intent) {
Ive created a service which plays the audio, but still when i change the layout on the activity the audio stops?
I cant because I have set it so that when I click on a button the this is called: setContentView(R.layout.menu_screen);
I tried making a different activity for the menu_screen.xml layout but when...
Hi,
Why does my MediaPlayer stop when I change the layout?
MediaPlayer mp = MediaPlayer.create(this, R.raw.background_song);
mp.setLooping(true);
mp.start();
To answer my own question............ What I'm actually doing is setting the content of the tab as an Activity???
This is what made me think that each activity is a different window:
"An activity is the equivalent of a Frame/Window in GUI toolkits. It takes up the entire drawable area of the screen"
I do have an understanding of Java. It's concept of an Activity which is confusing me. Reading different things on the internet have made me confused.
Hello, I'm trying to understand what exactly is happening in my code. Thanks in advance for replying, I'm pretty confused and need some help. I have read many things on the internet but i havnt found...
Thank you very much for your detailed reply.
I ask this because I havnt actually created an instance of my class so how can I be referring to an INSTANCE of my HelloAndroidActivity class?
Thanks for the reply. I also have another question, and as it is regarding this code I thought I'd ask it in this thread.
I know that the constructor of the TextView class requires a Context...
Hello, I following a "Hello World" tutorial for android development and I want to understand how the code works exactly, instead of just using it without understanding it, heres the code:
...
Thank you :)
Got it, thank you :)
Thank you very much for your detailed reply, much appreciated.
So, when i create an instance of my class which has extended JFrame, both my class constructor and the JFrame constructor is called...
I would understand how it all works if our class also inherits JFrame's constructor, if not then I can not see how creating an instance of our class creates a window.
Hi, I know when we extend a class our class gets all of the properties of the class we extend.
I am abit confused. I have read that when our class extends the JFrame class, our class then IS the...
Ah thank you, ive now got it to compile but it doesnt work.
I have to defined all of the methods of the KeyListener interface. I have removed the "if (keyCode == KeyEvent.VK_ESCAPE){" and just put...
This is my code, it is only small:
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
class MoveIcon implements KeyListener{