Javaに投稿されたコード一覧
static public final float map(float value, float istart, float istop, float ostart, float ostop) { return ostart + (ostop - ostart) * ((value - istart) / (istop - istart)); }
Object o = null; String s = (String)o; //OK! Object o2 = new Object(); String s2 = (String)o2; //ClassCastException
import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import javax.swing.JFrame; import javax.swing.JPanel;
import java.awt.Graphics; import javax.swing.JFrame; import javax.swing.JPanel; public class Sample {
package com.tatesuke.physicsdraw.base; import java.awt.Rectangle; import java.awt.Shape;
int size = map.size(); String[] keys = map.keySet().toArray(new String[size]); String[] vals = map.values().toArray(new String[size]);
int size = map.size(); String[] keys = new String[size]; String[] vals = new String[size]; int i = 0; for(Map.Entry<String, String> e : map.entrySet()) {