Category: Java

shape
shape
shape
shape
shape
shape
shape
shape
Standard

Installing and configuring Tomcat on your server

Installing and configuring Apache Tomcat on your server is a fundamental step in hosting server-based Java applications. Apache Tomcat, a web server and servlet container, offers a robust environment for running these applications. During the installation process, it is important to ensure that the configuration is done correctly to meet the application’s needs. Master da

Standard

JAVA: RMSE, MBE, Willmott, Correlation and Determination Coefficient Algorithm

JAVA: RMSE, MBE, Willmott, Correlation Coefficient and Determination Algorithm public class Estatistica { public String getStats (double valorObs[], double valorEst[], int n){ double somaQuadrados = 0; double somaTotalObs = 0; double somaTotalEst = 0; double estMenosMediaObs = 0; double obsMenosMediaObs = 0; double somaQuadradoEstMenosMediaObsMaisObsMenosMediaObs = 0; double somaEstMenosObs = 0; double somatorioUm = 0; //

Standard

Java SimpleDateFormat – Formatting Dates

SimpleDateFormat is a Java class that allows you to format dates.   Converting dates in en-US (United States) format to pt-BR (Brazilian) format:   package com.masterdaweb.blog; import java.text.ParseException; import java.text.SimpleDateFormat; public class Tutorial { public static void main(String[] args) throws ParseException { String usDate = “1992-08-25 13:30”; SimpleDateFormat brFormat = new SimpleDateFormat(“dd-MM-yyyy HH:mm”); SimpleDateFormat usFormat

Standard

Method overloading in Java

In Java you can declare methods with the same name in a class, but each method must contain different sets of parameters. In other words, this is called Method Overloading. public class Calculadora{ public int soma(int valor1, int valor2){ return valor1 + valor2; } public float soma(float valor1, float valor2){ return valor1 + valor2; }

Latest news

Latest news directly from our blog.