Q&A Discussies
Chess tournment
0 Stemmen
2 AntwoordenWhat is "Global Memory" in C++?
0 Stemmen
2 AntwoordenPlease explain the code and its output
-2 Stemmen
1 AntwoordWrite a static method called weave that that takes two integers as parameters and that returns the result of weaving their digits together to form a single integer. Two numbers x and y are weaved together as follows. The last pair of digits in the result should be the last digit of x followed by the last digit of y. The second-to-the-last pair of digits in the result should be the second-to-the-last digit of x followed by the second-to-the-last digit of y. And so on.
0 Stemmen
13 AntwoordenOutput of C++ code
0 Stemmen
2 AntwoordenHow to create dynamic websites?
0 Stemmen
2 AntwoordenCan 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 Stemmen
8 AntwoordenIt dawned on me! #3
1 Stem
1 Antwoordwhy we use position_static?
0 Stemmen
1 AntwoordHtml layouts
0 Stemmen
3 Antwoordenwhere's the error ?
-3 Stemmen
2 Antwoordenusing System;
namespace GoodProgrammerTest
{
class Program
{
static void Main(string[] args)
{
Console.Write("Enter Yes or No");
Console.Write(
"Do you programme every day? : ") ;
int answer = Console.ReadLine();
if (answer =="Yes")
{
Console.WriteLine(
"You will be a good programmer");
}
else
{
Console.WriteLine(
"You will not be a good programmer");
}
}
}
}
2 Stemmen
3 Antwoordenclass and object
1 Stem
1 AntwoordWhye error???
0 Stemmen
1 AntwoordI am confused on this
0 Stemmen
1 AntwoordHungry wolves and fishing.
-1 Stem
1 Antwoordpublic 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 Stem
2 Antwoordenjava learning
0 Stemmen
1 AntwoordPopulair vandaag
Pointers cpp
2 Votes
Is pro worth the money ?
1 Votes
Drawing images in java
2 Votes
Coding for Cybersecurity
0 Votes