Tag: tutorials
Java – How to Convert String to Long ?
Problem Statement You need to convert a java string to long in your java program. Solution The output of the above program is Abundantcode.com Java Tutorials 75 79
How to Declare and Define an signed byte data type variable in F# ?
How to Declare and Define an signed byte data type variable in F# ?
Building a ASP.NET Web API in Visual Studio 2015
This blog post will explain on how to create a Simple ASP.NET Web API using Microsoft Visual Studio 2015 and return an expose a List (Eg: List<Students>) over HTTP. This includes creating action methods and using them for get all students and get a particular student by id. How to create a Web API in Visual Studio 2015 and return a List over HTTP? Follow…
Converting an Enum to Integer in C#
If you need to convert an enum to its numeric equivalent , you can simply cast the values to integer . Below is a sample code snippet that demonstrates how to do it. Converting an Enum to Integer in C#
How to convert Array to List in Java ?
This article will explain how to convert a simple array to list in Java . How to convert Array to List in Java ? The Java’s array class provides necessary methods to convert the array to the List using the asList method. Below is a sample code snippet demonstrating the usage of the Arrays.asList method to convert array to List.
How to Declare and Define an Unsigned Integer data type variable in F# ?
How to Declare and Define an Unsigned Integer data type variable in F# ?
Python Program to add two integers
Problem Write a program in Python to add two integers and display the result on the screen. Python Program to add two integers Output Enter first number: 1 Enter second number: 2 1 + 2 = 3.0
Java – How to Read Integers from the Console for calculation ?
Problem Statement You need to read integers from the console window and use it for calculation within your java program. Solution If you want to know how to read integer value from a console and use it for calculation , you can use the Scanner class as shown below. The output of the above program is Please enter the first number for abundantcode 10 Please…
Java – How to Convert primitive long datatype to Long object?
Problem Statement You need to convert the primitive long datatype to object in Java. Solution Use the Long wrapper class to convert the long primitive to Long object as shown below. The output of the above program is Abundantcode.com Java Tutorials 89
Java – How to create BigDecimal from string value ?
Problem Statement You want to create a BigDecimal value from a string type in Java. Solution Use the BigDecimal class and pass the string value in the constructor to create the BigDecimal value as shown below. The output of the above program is Abundantcode.com Java Tutorials 198654586.297292792
C Program to display the characters from A to Z
Problem Write a program in C to display all the characters from A to Z using Loop constructs. How to display Characters from A to Z using C Programming Language ? Output Abundantcode.com programming sample A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
For Each loop in Java
Java 5 brought in the support in the support for foreach loop that lets the developers to iterate over collections pretty easily. The syntax for the foreach loop in java looks like the one shown below. for (<datatype> item: collection) { // Process the item } For Each loop in Java Below is an example that demonstrates foreach loop in java. package com.abundantcode; import java.util.ArrayList;…