Обсуждения
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 ответOutput of C++ code
0 голосов
2 ответов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 ответовurgent java
0 голосов
2 ответов"time is not defined"?
2 голосов
1 ответPublic static vs prívate static? C#
3 голосов
2 ответовConstructor Error
1 голос
2 ответовCan someone explain this code to me....
class ReverseNumberDemo
{ public static void main(String args[]) {
int num=123456789;
int reversenum =0;
while( num != 0 ) {
reversenum = reversenum * 10;
reversenum = reversenum + num%10;
num = num/10; }
System.out.println("Reverse of specified number is: "+reversenum);
}
}
the thing I don't get is the reversenum part......isn't reversenum=0 so wouldn't reversenum*10=0
0 голосов
8 ответовcan anyone plz explain me this program step by step?#include <iostream>
using namespace std;
class MyClass {
public:
int var;
MyClass() { }
MyClass(int a)
: var(a) { }
MyClass operator+(MyClass &obj) {
MyClass res;
res.var= this->var+obj.var;
return res;
}
};
int main() {
MyClass obj1(12), obj2(55);
MyClass res = obj1+obj2;
cout << res.var;
}I am not getting the part inside operator+
0 голосов
8 ответовIn dire need of tutoring or help
0 голосов
2 ответовStyling Swing Components in java
0 голосов
2 ответовwhere's the error ?
-3 голосов
2 ответовUse Controls In Class? (Winforms C#)
0 голосов
1 ответData Members and Member functions
-1 голос
1 ответObjects in heap?
0 голосов
1 ответ"id returned 1 exit status"?
1 голос
1 ответBinary search guessing game help
0 голосов
1 ответАктуальное сегодня
Is this realistic enough?
1 Votes
Need friends
0 Votes
Python
1 Votes
Web Development
0 Votes