Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
k2024
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tie
ohj2
esimerkit
k2024
Commits
af9071f5
Commit
af9071f5
authored
1 year ago
by
Vesa Lappalainen
Browse files
Options
Downloads
Patches
Plain Diff
live16 korjattu
parent
c4d4c9ae
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
luennot/live16/src/dynaaminenDouble/Taulukko.java
+1
-1
1 addition, 1 deletion
luennot/live16/src/dynaaminenDouble/Taulukko.java
luennot/live16/src/dynaaminenGen/Taulukko.java
+1
-1
1 addition, 1 deletion
luennot/live16/src/dynaaminenGen/Taulukko.java
with
2 additions
and
2 deletions
luennot/live16/src/dynaaminenDouble/Taulukko.java
+
1
−
1
View file @
af9071f5
...
...
@@ -65,7 +65,7 @@ public class Taulukko {
* @param arvo uusi arvo
* @throws IndexOutOfBoundsException jos väärä paikka
*/
public
void
set
(
int
i
,
int
arvo
)
throws
IndexOutOfBoundsException
{
public
void
set
(
int
i
,
double
arvo
)
throws
IndexOutOfBoundsException
{
if
((
i
<
0
)
||
(
lkm
<=
i
))
throw
new
IndexOutOfBoundsException
(
"set i = "
+
i
+
": "
+
arvo
);
alkiot
[
i
]
=
arvo
;
}
...
...
This diff is collapsed.
Click to expand it.
luennot/live16/src/dynaaminenGen/Taulukko.java
+
1
−
1
View file @
af9071f5
...
...
@@ -110,7 +110,7 @@ public class Taulukko<TYPE> {
luvut
.
set
(
1
,
4
);
System
.
out
.
println
(
luvut
.
toString
());
double
luku
=
luvut
.
get
(
2
);
Integer
luku
=
luvut
.
get
(
2
);
System
.
out
.
println
(
luku
);
// luvut.set(21, 4);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment