Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtisQ&A DiscussƵes
getting error when try to use this code
System.out.printf("my name is %s","Roy");
it's showing like: exception in thread"main" Java.lang.Error: unresolved compilation problem:
the method printf(String,Object[ ]) in the type printstream is not applicable for the arguments (String,int)at tutorial 19.App.main(App.java:11)
0 Voto
3 RespostasWhat is the default size of the text when I use 'font-size: [*]%' and is it change with different screens?
ŠŠ°ŠŗŠ¾Š¹ ŃŠ°Š·Š¼ŠµŃ ŃŠµŠŗŃŃŠ° ŠæŠ¾ ŃŠ¼Š¾Š»ŃŠ°Š½ŠøŃ, ŠŗŠ¾Š³Š“Š° Ń ŠøŃŠæŠ¾Š»ŃŠ·ŃŃ 'font-size: [*]%' , Šø Š¼ŠµŠ½ŃŠµŃŃŃ Š»Šø Š¾Š½ Š½Š° ŃŠ°Š·Š½ŃŃ
ŃŠŗŃŠ°Š½Š°Ń
?
1 Voto
2 Respostaswhat should i use to get in to next line ?
words=["Hello","world","!"]
print(words[0]) {then i pushed enter to write next line,but gave me answer , i mean i couldn't follow order that has been given}
Hello
and how should i write print(words[1]) in next lint without interruption? š
0 Voto
4 RespostasIf except can handle common errors very well, doesn't that make the use of raise redundant inside of a try-except block?
For example:
try:
print( 5 / 0 )
except ZeroDivisionError:
raise ValueError("An error occurred!")
What's the difference if we handle it this way:
try:
print( 5 / 0 )
except (ZeroDivisionError, ValueError):
print("An error occurred!")
3 Votos
2 Respostas
so although using srand(time(0)) can be used to get truly random numbers, how truly random are they? For example, if one were to call this method at the same time (in this example, if one were to use this command at 51s) each time would the numbers generated be the same???
If so, are the numbers still truly random??
And if this theory is true, how can one generate truly random numbers that cannot repeat based on external variables (e.g., time)?
2 Votos
4 RespostasHi, I need assistance aka HELP!
I've done this calculation in various ways some of printed nothing but zeros non stop.
Using while loop calculate all numbers 1 to 1000 add numbers to sum = sum + i
int sum = 0;
// use a while loop to calculate the sum of 1 to 1000
While(int sum = 0; sum >= 1000; sum = sum + I){
System.out.println(sum);
}
0 Voto
4 RespostasQuente hoje
Is the AI course worth the $49?
0 Votes
Where to use
0 Votes
Coding path
0 Votes
How to win bits
1 Votes