Examlex

Solved

Import Java.awt.*; Import Java.applet.*;

question 71

Short Answer

import java.awt.*;
import java.applet.*;
import javax.swing.*;
public class JSound extends JApplet
{
AudioClip sound;
public void init()
{
sound = getAudioClip(getCodeBase(),"mysteryTune.au");
}
public void start()
{
___________________________________
}
public void stop()
{
___________________________________
}
public void paint(Graphics g)
{
super.paint(g);
Graphics2D g2D = (Graphics2D)g;
g2D.drawString("Listen to the mystery tune ", 10, 10);
}
}
In the first shaded line provided, write the loop() method to play the mysteryTune.au sound continually. On the second shaded line, write the stop() method to halt the mysteryTune.au sound file.


Definitions:

Globalization

The process of interaction and integration among people, companies, and governments worldwide, often leading to the exchange of ideas, products, and cultural aspects.

Multinational Corporations

Large corporations operating in multiple countries around the world, often exerting significant economic, political, and social influence in the regions where they operate.

Union Membership

Refers to the affiliation of individual workers with organized labor unions which advocate for the rights, wages, benefits, and working conditions of their members.

Declined

A term referring to a decrease or rejection in context, whether in numbers, agreement to proposals, or the status of something.

Related Questions