Programming questions are off-topic here. Do not ask questions about how to write code in Java. However, conceptual questions about computer science are more appropriate. See our help center for the scope of this site.

learn more… | top users | synonyms

-2
votes
0answers
27 views

i have created simple login page using java script and html. but its not working properly [on hold]

I have created simple login page using java script and HTML . but it is getting logged in and moving to next window index.html, even though on giving wrong password.can u suggest me how to come out of ...
-3
votes
0answers
9 views

how can I make an object vissible to all threads in java? [on hold]

I have written this code, an implement of blocking queue: ...
-4
votes
0answers
21 views

software development [on hold]

Write a Java program which contains your own function(s) to calculate the solution of the problem given below then print which choise is true. There are 4 doctors and 7 nurses. How many 5-person teams ...
-6
votes
0answers
40 views

Please,I want an answer for this question [closed]

Write a Java program which contains your own function(s) to calculate the solution of the problem given below then print which choise is true. There are 4 doctors and 7 nurses. How many 5-person teams ...
-1
votes
0answers
5 views

Java - how to get around the width of my JFrame not being initialized for the first moment? [migrated]

I have a problem with my code. When I run it, the scores for myself and for the enemy are each set to one (although sometimes 2) in the beginning, because for some reason the frame width is set ...
-1
votes
1answer
35 views

Why does this statement evaluate to 176? [closed]

int y = 10; int z; z = (++y * (y++ + 5)); // Evaluates to 176 According to me this should evaluate to 180. Please provide an explanation as well which relates to ...
2
votes
0answers
22 views

Byte Code/IL Code execution [closed]

I understand that Byte/ IL Codes are interpreted/executed by their corresponding run times. Do those run time converts the Byte/IL codes directly to machine code which processor can execute or the ...
0
votes
1answer
68 views

How to write an EBNF grammar for Java float literals?

I've got this question on my study guide: "Write an EBNF grammar description for Java float literals and one for Java double literals." I've browsed the Oracle site and found the grammar for java ...
0
votes
0answers
15 views

What are the recursive relations for these max/min methods. [duplicate]

So basically I have two methods that find the max and min. The first one splits the array into n/2 and n/2 parts and continues to split the parts until there are only pairs of 2 or single values. The ...
-1
votes
1answer
19 views

Methods in Java with/without return? Simple but new to coding [closed]

I want to make this program below but I'm not sure how i would start them. Would i use methods with or without return? I have this due tomorrow and cannot figure it out. I've wrote the code multiple ...
1
vote
0answers
19 views

Implementing TCP request and answer [closed]

I'm creating an application where client connects to server, retrieves some data and after that connection is closed. He spends some time changing that data and then connects again to the server ...
1
vote
0answers
770 views

Beginner Guide/Tutorial to using Bluetooth in Java [closed]

I found this similar question: http://stackoverflow.com/questions/8677204/bluetooth-in-java-j2se It was asked in 2011. The answer has four links. The first two download links seem to work fine. The ...
-1
votes
1answer
73 views

What do you mean by minimum height of a Binary Search Tree? [duplicate]

I came across the term "minimum height of a Binary Search Tree" (in Java) in class, but I don't fully understand. Could someone please elaborate on: (a) What it is ? (b) How to ...
-1
votes
1answer
31 views

Is it possible to make excluded search with for loop in Java? [closed]

I am trying to calculate all pure strategy Nash equilibrium in a mxn game. It requires to check all pure strategy pairs (m.n pairs). Suppose player 1 has m strategies. Algorithm should start with the ...
-1
votes
2answers
67 views

Analysing Algorithms Big Oh/Complexity theory [duplicate]

I'm revising for my finals and from looking at previous exam papers I have a found a popular question that has came up almost every year, worth a lot of marks. Each year the question is written very ...
1
vote
2answers
141 views

Break and Continue in Structured Programming?

One of the ways to ensure following the structured programming paradigm is by having all control flows having only one entry and one exit point. Does skipping iterations by using break and continue in ...
0
votes
2answers
128 views

How to learn computer science the right way [closed]

I looked through the sites and this seems to be the best place to ask this question. I am sure it has been asked 10000 times but I am looking for a tailored answer to me and my situation. I currently ...
1
vote
1answer
70 views

Isn't software needed from programs to run? [closed]

I am a student who has entered a game programming competition called FBLA at school, and I sent them an email because I had a few questions about how the competition is ran. The main question I had, ...
-1
votes
1answer
49 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
233 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
283 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 ...
3
votes
1answer
310 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
583 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
224 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 ...