What do you want to save?
Add Code snippet
New code examples
-
Java 2022-01-29 21:40:54
Java create new file
import java.io.FileWriter; // Import the FileWriter class import java.io.IOException; // Import the IOException class to handle errors public class WriteToFile { public static void main(String[] args) { try { FileWriter myWriter = new File... Add solution -
Javascript 2022-01-28 16:51:58
month javascript get data range
$(function(){ var formatted_date = function(date){ var m = ("0"+ (date.getMonth()+1)).slice(-2); // in javascript month start from 0. &nb... Add solution -
Java 2022-01-26 18:12:05
how to break two loop in java
import java.io.IOException; /** * How to break from nested loop in Java. You can use labeled * statement with break statement to break from nested loop. * * @author WINDOWS 8 */ public class BreakingFromNestedLoop{ public static void main(Str... Add solution -
Java 2022-01-26 08:41:53
how to find the ascii value of special character in java
/*ASCII acronym for American Standard Code for Information Interchange. It is a 7-bit character set contains 128 (0 to 127) characters. It represents the numerical value of a character. For example, the ASCII value of A is 65.*/ char a = 65, b = 66, c = 6... Add solution -
Java 2022-01-26 02:10:14
Calculate area of rectangle using class in java
// calculate area of rectangle using class in java import java.io.*; class RectangleShape { int length, breadth; void setValue(int l, int b) { length = l; breadth = b; } // get area of rectangle int findArea() { ... Add solution -
Java 2022-01-26 01:25:16
why cant we have primitive types in generixs
//In java generics are implemented by using "Type erasure" for backward compatibility. All generic types are converted to Object at runtime. for example, public class Container<T> { private T data; public T getData() { r... Add solution -
Other 2022-01-24 07:27:01
what access modifiers can be used for methods
In Java, access specifiers are the keywords which are used to define the access scope of the method, class, or a variable. In Java, there are four access specifiers. * Public: The classes, methods, or variables which are defined as public, can... Add solution