Обсуждения
How String in java is immutable?
0 голосов
3 ответовWho have DuckGame
0 голосов
6 ответовClasses, methods and objects.
1 голос
1 ответwhile inside while loop
0 голосов
2 ответовcorrect me if I'm wrong
0 голосов
2 ответов#include <iostream>
using namespace std;
class employee
int main()
{
private:
double salary;
public:
void getsalary(double sal)
{
salary=sal;
}
void display()
{
cout<<"the salary:"<<salary;
}
};
void main ()
{
employee programmer;
employee manager;
manager.getsalary (60000.0);
programmer.getsalary(40000.0);
manager.display();
programmer.display();
return 0;
}
1 голос
5 ответовUsing SoloLearn with large groups
0 голосов
1 ответSolve errors on this code
0 голосов
2 ответовPublic, static and void
0 голосов
2 ответовwhy is it not running?
import java.util.Scanner;
public class Myclass{
public static void main(String [] args){
Scanner in = new Scanner(System.in);
String a;
int b;
System.out.println("enter a word");
a = in.nextLine();
System.out.println("enter repetition")
b = in.nextInt();
for ( int = 0; x < b; x = x++)
System.out.println(a);
}
}
0 голосов
8 ответовCan anyone help me?
0 голосов
5 ответовCSS The text-indent property I do not understand why you would use this when the </br> tag takes the text back to the left hand side of the page, and as soon as I start a new class the first line of text in a paragraph even with a class it imprints onto every other paragraph like it or not. Why is this please?
0 голосов
2 ответовPllllz help I am afraid
1 голос
4 ответовProblems with my inheritance program
0 голосов
1 ответHow to disable a button in java
0 голосов
1 ответI need help!
0 голосов
1 ответWhy do we use "@classmethod"?
0 голосов
1 ответExplain your experience using c++
0 голосов
1 ответpublic class Vehicle {
int maxSpeed;
int wheels;
String color;
double fuelCapacity;
void horn() {
System.out.println("Beep!");
}
}
class MyClass {
public static void main(String[ ] args) {
Vehicle v1 = new Vehicle();
Vehicle v2 = new Vehicle();
v1.color = "red";
v2.horn();
System.out.println(v1);
}
}
Explain its outcome. I am unable to get the last line of outcome.
-1 голос
2 ответовOutput of C++ code
0 голосов
2 ответовcan someone help..
what does this code means so it could have the output like on the example..
class SpecialString:
def __init__(self, cont):
self.cont = cont
def __gt__(self, other):
for index in range(len(other.cont)+1):
result = other.cont[:index] + ">" + self.cont
result += ">" + other.cont[index:]
print(result)
spam = SpecialString("spam")
eggs = SpecialString("eggs")
spam > eggs
1 голос
5 ответовurgent java
0 голосов
2 ответовАктуальное сегодня
Pig Latin
0 Votes
Someone can help me
0 Votes
Square Roots
0 Votes
What's wrong with this?
2 Votes
I’m new someone can help me
0 Votes
What's doctype htMl
2 Votes
HTML community, HELP!!
0 Votes