Java Programming Java Code Samples



Filters


Deduplicate a string in java
harika | 2 years, 5 months
import java.util.HashMap;
public class DeduplicationOfString{
        static String dedup(String i
java string
ashokrebel007
8080 port already taken issue when trying to redeploy project from Spring Tool Suite IDE
ashokrebel007 | 2 years
Open CMD with Administrator

1. Check what processes are running at available ports
If you want do this one you should open the CMD with Administrator only.
java
How to read a file from nth line onwards in java?
Reshma | 1 year, 2 months
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
reading nth line onwards java
srija
While opening eclipse getting java virtual machine not found error
srija | 1 year, 7 months
First we have to check is java successfully installed or not check using below command
java -versio
java eclipse
Reading application.properties with @Value Annotation
Reshma | 1 year, 5 months
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.fac
application.properties java @value
Read application.properties Using the Environment
Reshma | 1 year, 5 months
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.
Here, we are using @Autowired annotation to inject the environment object into our RestController ,
java application.properties environment
Reading application.Properties with @ConfigurationProperties
Reshma | 1 year, 5 months
//AppProperties.java

import org.springframework.boot.context.properties.ConfigurationProperties;
To use AppProperties.java we have to create a Controller or Service class.In order to include it we
application.properties java @configurationproperties
Comments executed
Reshma | 1 year, 7 months
public class Testing { 
    public static void main(String[] args) 
     { 
The reason for this is that the Java compiler parses the unicode character \u000d as a new line and
java comments
Permutations of a Given String
Reshma | 1 year, 7 months
public class Permutation { 
    public static void main(String[] args) 
    { 
java permutation
Finding anagram
itulasi | 1 year, 6 months
import java.util.Arrays;

public class StringAnagram {
Anagram of the string is a string contains the same characters. But order of the characters may be d
java string anagram
Next