Answer:
public class Leo{
public String method1(){
return "Jack 1 Leo 1";
}
public String method2(){
return "Don 2 Jack 2";
}
public String method3(){
return "Jack 3 Leo 3 Don 2";
}
public String toString(){
return "Jack 3 Leo 1"
}
}
public class Jack extends Leo{
}
Explanation:
Leo is the parent class and jack inherits all of its attributes from Leo
So when you call the following code in the main method:
Jack j = new Jack();
System.out.println(j.method1);
it should print Jack 1 Leo 1
This is because the program first checks if method 1 exists in the Jack class
Because it doesn't exist it then goes to the parent class which is Leo.
And in the Leo class method1 displays "Jack 1 Leo 1 "
So it prints that
Explanation:
The name "multimedia" itself tells us that, it involves "multiple types of media".
There are 5 different types of media which comes under multimedia. They are "text, video, audio, graphics, animation".
Text: A plain text
Audio: The musical background or any type of audio
Video: Visuals taken through cameras
Graphics: The use of diagrams in calculation and design
Animation: Moving pictures.
So video texted involves "more than one type of media" so this can be called as "multimedia".
Answer: The .(dot) character
Explanation: in Linux, the period (dot) is short hand for the bash built in source. It will read and execute commands from a file in the current environment and return the exit status of the last command executed.
The .(dot) character is the first character for a file or directory names if they should not be displayed by commands such as ls unless specifically requested
Answer:
An apple a day keeps the doctor away...
Answer:
#include <iostream>
using namespace std;
int main() {
int i = 2;
double j = 3;
int *p = &i;
double *q = &j;
cout << "p = " << p << ", p+1 = " << p+1 << endl;
cout << "q = " << q << ", q+1 = " << q+1 << endl;
return 0;
}
Explanation:
In C++, pointers are variables or data types that hold the location of another variable in memory. It is denoted by asterisks in between the data type and pointer name during declaration.
The C++ source code above defines two pointers, "p" which is an integer pointer and "q", a double. The reference of the variables i and j are assigned to p and q respectively and the out of the pointers are the location of the i and j values in memory.