Questions tagged [unchecked]

An option "unchecked" used to turn off a javac compiler warnings about failing to use generics because it does not have enough type information to perform all type checks necessary to ensure type safety.

The term "unchecked" means that the javac compiler does not have enough type information to perform all type checks necessary to ensure type safety. The "unchecked" warning is disabled, by default, though the compiler gives a hint. To see all "unchecked" warnings, recompile with -Xlint:unchecked.

In JDK 1.5 an annotation was introduced called SuppressWarnings. It could be used to insert the annotation prior to a class or method telling which sort of warning you want suppressed.

A @SuppressWarning option unchecked used to turn off a javac compiler warnings about failing to use generics.

243 questions
0
votes
1 answer

Passing a value for an unchecked radio button or checkbox

Is there a way to pass a value for an unchecked radio button or checkbox that is different from the value when it is checked? I'm using jQuery to serialize, so it would be good if there is an html or jQuery solution.
0
votes
1 answer

checkbox always in unchecked status no matter if is checked or not

I am using chekbox in my code but its always showing unchecked .I am using the chekbox as show below in my form and on submit ion i am cheking the value with if statement as shown below
0
votes
2 answers

Project9.java uses unchecked or unsafe operations

public class Project9 { public static void main(String args[]) { InventoryItem[] items = new InventoryItem[3]; items[0] = new InventoryItem("Coffee", 1); items[1] = new InventoryItem("Pencils", 2); items[2] =…
0
votes
0 answers

Menu Item Check and Uncheck

I want the menu work like this: when I click on any of the items in the Menu, it gets checked. Now when I select another item from the same Menu, the previously selected item becomes unchecked and the newly selected item appears as…
Selva
  • 1,310
  • 2
  • 14
  • 31
0
votes
2 answers

Java unchecked warnings add arraylist

Here is the main program public class MainPerson { public MainPerson(){} public static void StartMainPerson() { int i = 1; ArrayList PersonList; ArrayList InitializedPersonList; final int…
user2102697
  • 29
  • 1
  • 8
0
votes
1 answer

show if 1 checkbox checked, hide if SEVERAL UNCHECKED jquery

Hi I would like to figure out how to do some logic on a checkbox dilemma. I have a listing for a video with tags associated with it. It has a corresponding checkbox. When the checkbox is checked the listing (display: none) is shown using jquery.…
user1288838
0
votes
1 answer

Program uses unchecked or unsafe operations for 2d ArrayList[][]

I have a task at the university to make a play board made of play fields. Every field can contain numerous items on it. I made it with an array arrayList like that: List[][] items = new ArrayList[x][y]; In Eclipse everything's OK, but when…
0
votes
1 answer

Modify this function to remove values if they're unchecked

I'm using this function with an unordered list (
    ) in order to replicate the functionality of a Select dropdown element. The function correctly shows the user's selected values in the designated container when they are checked, but it isn't…
Chaya Cooper
  • 2,566
  • 2
  • 38
  • 67
0
votes
0 answers

-Xlint unchecked in java

Possible Duplicate: What causes javac to issue the “uses unchecked or unsafe operations” warning Im getting following warning. What is -xlint:unchecked. If i include -xlint:unchecked in build.xml, Im getting lot of warnings. Note: Some input…
0
votes
2 answers

Implementing java application with unchecked exceptions

Possible Duplicate: Java unchecked/checked exception clarification I have been reading about debates on checked vs unchecked exceptions in java, i know the difference but i am not fully clear how we can choose one over the other. Do we really…
0
votes
2 answers

Wierd unchecked conversion warning

I have used a Strategy pattern in my code, here is a short fragment: public interface FindingStrategy { Callable setAction(); } class FindSomething implements BindingActionStrategy { ... @Override public Callable
Raidmaster
  • 603
  • 2
  • 7
  • 15
0
votes
3 answers

Calling generic Java function with parameter

Is the following possible somehow? interface Foo { public void bar(T object); } ... public void callBar(Foo foo) { foo.bar("Hello world!"); } Clearly, this is not type-safe as it is assuming that Foo in this case actually is a…
Markus A.
  • 12,349
  • 8
  • 52
  • 116
0
votes
1 answer

Unchecked checkboxes gets posted

I have a form with checkboxes: When I uncheck a checkbox is getting posted while it should not…
Spyros
  • 313
  • 4
  • 12
0
votes
4 answers

jquery check and uncheck all with action

I have more checkbox input that call function "boxclick" when the user click on this:
Titan plus
  • 45
  • 11
0
votes
1 answer

Why is my code causing "unchecked or unsafe operations" warning being flagged by compiler?

My java compiler is complaining that my code uses "unchecked or unsafe operations". Any idea which lines are causing that in the two code snippets? @SuppressWarnings("unchecked") private final void…
ikevin8me
  • 4,253
  • 5
  • 44
  • 84