What do you want to save?
Add Code snippet
New code examples
-
Java 2021-11-13 17:06:09
could not find java; set JAVA_HOME or ensure java is in PATH
After reading the docs from ElasticSearch, I found that if you're running on Ubuntu or Debian, the package only ships with the OpenJDK because of licensing issues. To fix this Java path problem, I installed the following after installing ElasticSearch (as... Add solution -
Java 2021-11-12 20:06:14
should i learn kotlin or java
Both Java and Kotlin are awesome, and it is totally a choice of yours. Keep in mind that you should use programming language as a tool. So, learn both but explicitly Kotlin also typically has fewer codes, whereas Java adheres more to a tradit... Add solution -
-
Java 2021-11-09 11:08:12
java jpasswordfield getpassword
import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JButton; import javax.swing.JPasswordField; import javax.swing.JTextField; import javax.swing.JOptionPane; import java.awt.FlowLayout; import java.awt.event.ActionListener; import ja... Add solution -
Java 2021-11-09 08:09:07
How to get time now hours, minutes, seconds Each one separately
package com.zetcode; import java.time.LocalTime; public class JavaLocalTimeParts { public static void main(String[] args) { LocalTime time = LocalTime.now(); System.out.printf("Hour: %s%n", time.getHour()); Syste... Add solution -
Javascript 2021-11-07 17:39:15
the function tag in js
<html> <p id = demo> </p> <p> this javascript function is returning the product of p1 and p2. <script> function myFunction (p1, p2){ return p1 * p2 } document.getElementById("demo").innerHTML = myFu... Add solution -
Java 2021-11-04 21:55:15
how to find length of array in java
/** * An Example to get the Array Length is Java */ public class ArrayLengthJava { public static void main(String[] args) { String[] myArray = { "I", "Love", "Music" }; int arrayLength = myArray.length; //array length attribu... Add solution -
Java 2021-11-04 18:24:08
string.replace in java
public static void main(String args[]){ String s1="my name is khan my name is java"; String replaceString=s1.replace("is","was");//replaces all occurrences of "is" to "was" System.out.println(replace... Add solution