The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
4 views

Running a terminal program from java and saves it to a file called output1.txt [migrated]

import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.FileOutputStream; import java.io.InputStream; public class RunInput { public static void main(String[] args) { ...
-1
votes
0answers
9 views

Exception in thread “main” java.lang.ArrayIndexOutOfBoundsException: 0 [migrated]

I am trying to get the host address by passing host name. But while running my code, I get the exception: ...
-1
votes
1answer
32 views

Linked list implementation problem [closed]

Note its not a homework question, just practice Hi i have always seen linked list implementation in java using the following piece of code ...
1
vote
1answer
150 views

Code to get java code complexity [duplicate]

I have Java function as input and want to get it's order for example O( n ) I search in the internet very hard but didn't find any thing can help me, is there any algorithms or package may help me.
2
votes
1answer
151 views

Java, strong typing, covariance and contra-variance

While studying for a test in my OOP course, I came upon this question which had an answer I didn't really understand. The question is as follows (translated): The programming language "Sava" is ...
2
votes
1answer
205 views

Contracts for Java Bytecode

Introduction For a paper I need contracts, which are also referred to as Design by Contract (DbC)1, and conceptually go back to Hoare[2]. For my work I need to apply contracts to Java bytecode. The ...
7
votes
3answers
298 views

Inheritance, and dynamic access to members/attributes and methods in Java-like languages

I have a question about inheritance in Java-like OO programming languages. It came up in my compiler class, when I explained how to compile methods and their invocation. I was using Java as example ...
3
votes
1answer
196 views

Is the type inference here really complicated?

There's a question on SO asking why in Java the right type doesn't get picked in a concrete case. I know that Java can't do it in such "complicated" cases, but I'm asking myself WHY? The (for ...