logo

Crowdly

Browser

Add to Chrome

ITI0202 Programmeerimise põhikursus (2025 kevad)

Looking for ITI0202 Programmeerimise põhikursus (2025 kevad) test answers and solutions? Browse our comprehensive collection of verified answers for ITI0202 Programmeerimise põhikursus (2025 kevad) at moodle.taltech.ee.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Abstraktsed klassid erinevad teistest klassidest selle poolest, et...

0%
0%
0%
0%
View this question

// import ALL useful classes

import java.util.*;

class lamp {

int static count = 0;

public int id;

public static List<lamp> Lamps = new ArrayList<lamp>();

public lamp() {

if (Lamps.size() >= 10) {

throw new NullPointerException("It is impossible to have more than 10 lamps!");

}

// give every instance an unique id

this.id = count++;

Lamps.add(this);

}

public List<lamp> getLamps() {

// ensure user cannot change this list

return Collections.unmodifiableList(Lamps);

}

public static void main(String[] args) {

while (true) {

lamp m = new lamp();

System.out.println(m.id);

}}}

Mille vastu on koodi kirjutamisel eksitud (vali 5)?

0%
0%
0%
0%
0%
0%
0%
0%
0%
0%
View this question

Milline numbrijada on selle tsükli väljundiks?

for (int i = 0; i < 5; i++) {

System.out.print(++i + i-- + " ");

}

0%
View this question

Mida tagastab antud funktsioon?

public String loopAlphabet() {

String alphabet = "abcdefghijklmnopqrstuvwxyz";

// 'a' ascii code is 97

String answ = "";

for (int i = 0; i < alphabet.length(); ++i) {

int letter = (int) alphabet.charAt(i);

if (letter % 2 != 0) answ += (char) letter;

}

return answ;

}

0%
0%
0%
0%
0%
View this question

Vii koodijupp kokku selle tüüpilise tulemusega.

View this question

Kuidas saavutatakse polümorfismi?

0%
0%
0%
0%
View this question

Mis osatähtsus on võtmesõnal "extends" liideste pärimisel?

0%
0%
0%
0%
View this question

Kas liideses defineeritud default meetodites pääseb ligi seda liidest implementeerivate klasside public liikmetele?

0%
0%
0%
0%
View this question

Mida nimetatakse alamklassiks?

0%
0%
View this question

Mis on erinevus == ja .equals() vahel Javas?

0%
0%
0%
0%
0%
View this question

Want instant access to all verified answers on moodle.taltech.ee?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome