What do you want to save?
Add Code snippet
New code examples
-
Other 2022-01-30 19:01:57
call cll to java
package jnahelloworldtest; import com.sun.jna.Library; import com.sun.jna.Native; import com.sun.jna.NativeLong; import com.sun.jna.Platform; import com.sun.jna.*; /** Simple example of native library declaration and usage. */ public class Main { pu... Add solution -
Other 2022-01-30 18:41:36
json parse java
import org.json.*; String jsonString = ... ; //assign your JSON String here JSONObject obj = new JSONObject(jsonString); String pageName = obj.getJSONObject("pageInfo").getString("pageName"); JSONArray arr = obj.getJSONArray("po... Add solution -
Java 2022-01-27 18:05:23
java code to get all leaf nodes of a xml file
try { final Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse("input.xml"); final XPathExpression xpath = XPathFactory.newInstance().newXPath().compile("//*[count(./*) = 0]"); final NodeList nodeList ... Add solution -
Java 2022-01-23 02:35:19
iterate over string java
String scientistName = "Isaac Newton"; for (int i = 0; i < scientistName.length(); i++) { System.out.print(scientistName.charAt(i) + " "); // I s a a c N e w t o n } //*******************************************************... Add solution -
Java 2022-01-22 08:45:45
write data to a file GUI javafx
package com.fileio; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.s... Add solution